1.

Identify the statements listed below as assignment, increment, method invocation or object creation statements.(i) System.out.println(“Java”); (ii) costPrice = 457.50; (iii) Car hybrid = new Car (); (iv) petrolPrice++;

Answer»

(i) System.out.println(“Java”);—method invocation statement. 

(ii) costPrice = 457.50;—assignment statement. 

(iii) Car hybrid= new Car();—object creation statement. 

(iv) petrolPrice++;—increment statement.



Discussion

No Comment Found

Related InterviewSolutions