Statement Identification – Computer Sir Ki Class
  

Login
[lwa]



Solved Problem! #JAVA#3730    siteicon   siteicon  

Problem Statement - Statement Identification

Each of the following lines are a different type of statement in Java. Identify them.
int a=10;
a=13;
a++;
String s=new String(“Hello”);
for(int i=0;i<2;i++) ;
System.out.println(s);

TC++ #3730

Solution


int a=10;
Declaration Statement.

a=13;
Assignment Expression Statement.

a++;
Increment Expression Statement.

String s=new String(“Hello”);
Object Creation Expression Statement.

for(int i=0;i<2;i++);
Control Flow Statement.

System.out.println(s);
Method Invocation Statement.

Notes


Share

sunmitra| Created: 4-Mar-2018 | Updated: 4-Mar-2018|






Back