Professional Documents
Culture Documents
What Are The Pros and Cons of Java?: Java Is The Queen of Programming Languages. It Beholds The Pride of The
What Are The Pros and Cons of Java?: Java Is The Queen of Programming Languages. It Beholds The Pride of The
What Are The Pros and Cons of Java?: Java Is The Queen of Programming Languages. It Beholds The Pride of The
Over the years Java has maintained its position in the top 3 programming
Languages and beholds the pride of the most preferred programming
language by the software developers.
It is one of the most effected and powerful languages and it is the most
widely used programming language in different areas.
Java is more stable compared to other languages and the newer version of
java released with more features makes more stable
It is a high-level programming and platform independent language that is
written once and run anywhere (WORA). The byte code produced by the
compiler can be used in any machine that supports Java virtual machine.
Finally, it is Object oriented programming language which helps us to use
the reusability of code in other programs and allows to create modular
programs.
Java is the Queen of programming languages. It beholds the pride of the
most preferred programming language by
2. What are the pros and cons of Java?
A.
2
Any keyword (or) Instance variable.
To use the non-static variable, we need to create the object.
It can be accessed by any method and any class with the help of class
and object creation.
Local variable: Variables that are declared inside the class are called local
variables
These can be used only in the class where it is declared.
Without assigning the variable we can't use it.
For both static and non-static variables even without assigning the data we
can use it.
SYNTAX:
Variable:
Static variable:
classname.variablename
Object.staticmember
Non-Static Variable:
object.non-staticmember
Object creation:
classname variable =new classname();
3
For method:
Static method:
No need to create the object
className.methodName(args);
Non-static method:
Needs to create the object
classname variable =new classname();
variable.methodname(args);
Main method:
classname.main(null);
Scanner:
Scanner scn=new Scanner (System.in);
String s=scn.next();
String s=scn.nextLine();
int a=scn.nextInt();
IF:
if (cond)
{
body of the program.
}
else if (cond)
{
body of the program
}
else
{
}
4
Switch
switch(exp)
{
case 1:
body of the program
case 2:
body of the program
}