What is the output of the following JAVA program?

class simple

{

public static void main(String[ ] args)

{

simple obj = new simple( );

obj.start( );

}

void start( )

{

long [ ] P= {3, 4, 5};

long [ ] Q= method (P);

System.out.print (P[0] + P[1] + P[2]+”:”);

System.out.print (Q[0] + Q[1] + Q[2]);

}

long [ ] method (long [ ] R)

{

R [1]=7;

return R;

}

} //end of class

1
12 : 15
2
15 : 12
3
12 : 12
4
15 : 15

Sponsored

hivanix.in

Visit

This quiz is brought to you by hivanix.in

🌐 Web App Development

Quick Navigation