Java Evolutions

quiz on Java Evolutions 

0
Created on By wefru

Java Evolutions

TEST YOUR SKILLS BRODLY

1 / 10

Q.111 What is the range of short data type in Java?

2 / 10

Q.112 What is the range of byte data type in Java?

3 / 10

Q.113 Which of the following are legal lines of Java code?

   1.  int w = (int)888.8;   2. byte x = (byte)100L;   3. long y = (byte)100;   4. byte z = (byte)100L;

4 / 10

Q.114 An expression involving byte, int, and literal numbers is promoted to which of these?

5 / 10

Q.115 Which of these literals can be contained in float data type variable?

6 / 10

Q.116 Which data type value is returned by all transcendental math functions?

7 / 10

Q.117

What will be the output of the following Java code?

public static void main(String args[])
{
double num[] = {5.5, 10.1, 11, 12.8, 56.9, 2.5};
double result;
result = 0;
for (int i = 0; i < 6; ++i)
result = result + num[i];
System.out.print(result/6);

}
}

8 / 10

Q.118 What will be the output of the following Java statement?

class output {
public static void main(String args[])
{
double a, b,c;
a = 3.0/0;
b = 0/4.0;
c=0/0.0;

System.out.println(a);
System.out.println(b);
System.out.println(c);
}
}

9 / 10

Q.119 What will be the output of the following Java code?

class increment {
public static void main(String args[])
{
int g = 3;
System.out.print(++g * 8);
}
}

10 / 10

Q.120 What will be the output of the following Java code?

class area {
public static void main(String args[])
{
double r, pi, a;
r = 9.8;
pi = 3.14;
a = pi * r * r;
System.out.println(a);
}
}

Your score is

The average score is 0%

0%

Leave a Reply