Which of the following options can be inserted at the commented line to compile the given code:

Code
  1. span style="color: #666666; font-style: italic;">// insert code here

  2. }

  3. }
Copyright GeekInterview.com

a) Class1 c1 = new Class1("HCL"){ }

b) Class1 c1 = new Class2(){ };

c) Class2 c3 = new Class1(String s){};

d) Class1 c1 = new Class1(100){ };

Questions by lalithakasiraj

Showing Answers 1 - 4 of 4 Answers

sashank

  • Dec 22nd, 2012
 

b) Class1 c1 = new Class2(){ };

  Was this answer useful?  Yes

Prasad MN

  • Dec 28th, 2012
 

Class c1 = new Class2()

Somone

  • Mar 29th, 2013
 

a & b

  Was this answer useful?  Yes

Abhinav Rohatgi

  • Apr 1st, 2013
 

Both a & b

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions