Big Decimal is a part of which package
How to Copy the content of an array
Composition - child object gets killed if the parent object is killed
Which of the following does not have a fixed size?
Which of these Byte wrapper class methods can be used to obtain a Byte object from a string?
Which method of the HttpdClass is used to write an UrlCacheEntry object to the local disk?
What is the output of the following code?
class Test
{
public static void main(String[] args) {
boolean a = true;
boolean b = false;
boolean c = a ^ b;
System.out.println(!c);
}
}
Can we compile a Java program without a main method?
Predict the output of the following Java code.
import java.util.*;
class Abekus {
public static void main(String args[]) {
Formatter F = new Formatter();
F.format("20 %% 5 == 0");
System.out.println(F);
}
}
Predict the output of the following Java program.
final class Complex {
private double real, imag;
public Complex(double re, double im) {
this.real = re;
this.imag = im;
}
Complex(Complex c) {
System.out.println("Copy constructor called.");
real = c.real;
imag = c.imag;
}
public String toString() {
return "(" + real + " + " + imag + "i)";
}
}
class Main {
public static void main(String[] args) {
Complex c0 = new Complex(22, 45);
Complex c1 = new Complex(c0);
Complex c2 = c0;
System.out.println(c1);
}
}