R
Q. Predict the output of following Java program
final class Complex { private final double re; private final double im; public Complex(double re, double im) { this.re = re; this.im = im; } public String toString() { return "(" + re + " + " + im + "i)"; } } class Main { public static void main(String args[]) { Complex c = new Complex(10, 15); System.out.println("Complex number is " + c); } }
No solution found for this question.
Add Solution and get +2 points.
You must be Logged in to update hint/solution
Be the first to start discuss.
Q. When method is overridden , then by subclass object which class method is called _____.
Q. Which of the following is a valid syntax to synchronize the HashMap?
Q. Which of the following statements are true?
Q. What is the output of the below Java program?
Q. Access modifier which is accessible only within class is called
Q. If not assigned a value, a variable of type char has the following default value:
Q. Which of these events is generated when the size os an event is changed?
Discusssion
Login to discuss.