Online Test

:

 

What will be the output of the program?

class Test 
{
    public static void main(String [] args) 
    {
        int x=20;
        String sup = (x < 15) ? "small" : (x < 22)? "tiny" : "huge";
        System.out.println(sup);
    }
}

Which statement is true about a static nested class?


Which of these packages contains the exception Stackoverflow in Java?


 What is the output of this program?

 class booloperators {
        public static void main(String args[]) 
        {
            boolean var1 = true;
        boolean var2 = false;
        System.out.println((var2 & var2));
        } 
    }

Which constructs an anonymous inner class instance?


Which of these is an incorrect Statement?


Which of the following is correct way of importing an entire package ‘pkg’?


Which of the following are Java reserved words?

  1. run
  2. import
  3. default
  4. implement

Which of these events will be notified if scroll bar is manipulated?


Which of these is returned by operators &, ?


Which class does not override the equals() and hashCode() methods, inheriting them directly from class Object?


Which of these occupy first 0 to 127 in Unicode character set used for characters in Java?


What is the output of this program?

class main_class {
        public static void main(String args[])
        {
            int x = 9;
            if (x == 9) { 
                int x = 8;
                System.out.println(x);
            }
        } 
    }

What will this code print?
int arr[] = new int [5];
System.out.print(arr);


A _________ is a basic unit of storage in Java.

 

About Us

TechEpi.com is an online learning website.We cover the latest tech news,online tutorials,blog,online test for Aptitude,C,Java,PHP to improve your knowledge.

Newsletter


Follow TechEpi on