91.
What will be the output of the following Java code?
class char_increment 
{
    public static void main(String args[]) 
    {
        char c1 = 'D';
        char c2 = 84;
        c2++;
        c1++;
        System.out.println(c1 + " "  + c2);
    } 
}

93.
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;

97.
What will be the output of the following Java program?
class evaluate 
{
    public static void main(String args[]) 
    {
        int a[] = {1,2,3,4,5};
  int d[] = a;
  int sum = 0;
  for (int j = 0; j < 3; ++j)
            sum += (a[j] * d[j + 1]) + (a[j + 1] * d[j]);
  System.out.println(sum);
    } 
}

98.
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);
    } 
}

100.
How to get difference between two dates?

Read More Section(Data Types and Variables)

Each Section contains maximum 100 MCQs question on Data Types and Variables. To get more questions visit other sections.