What will be the binary representation of the number 17 in Java?
A synchronized method is applied to
Setter and Getter used
Predict the output of the following Java code.
class test{
public static void main (String[] args) {
int a=7|8;
int b=0^a;
System.out.println(b^15);
}
}
public class j{
public static void main(String args[]){
String str = "12acf23df4fg34";
System.out.println(str.replaceAll("\\d", ""));
}
}
Which statement is correct about interfaces in Java?
class test{
public static void main (String[] args) {
int x=10,y=15;
if(~x==10 || ~y<15)
{
x--;
}
else
{
y++;
}
System.out.println(x+" "+(--y));
}
}
What is the output of this program?
class Output
{
public static void main(String args[])
{
double x = 2.1;
double y = 3.5;
double z = Math.max( x, y );
System.out.print(z);
}
}
What will be the output of the following Java code?
class Output
{
public static void main(String args[])
{
long start, end;
start = System.currentTimeMillis();
for (int i = 0; i < 10000000; i++);
end = System.currentTimeMillis();
System.out.print(end - start);
}
}