Online Test



If an expression contains double, int, float, long, then whole expression will promoted into which of these data types?

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

JAR stands for?

Which of the following are Java reserved words?

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

Which statement is true about a static nested class?

What would be the signature of a method myfunc() that :

1. Has a double array as a formal parameter 

2. Returns an array of integers.

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

A _________ is a basic unit of storage in Java.

Which of these is necessary condition for automatic type conversion in Java?

Which of these methods can be used to obtain the reference to the container that generated a ContainerEvent?

Which three are valid method signatures in an interface?

  1. private int getArea();
  2. public float getVol(float x);
  3. public void main(String [] args);
  4. public static void main(String [] args);
  5. boolean setFlag(Boolean [] test);

What allows the programmer to destroy an object x?

What will be the output of the program?

public class Foo 
    public static void main(String[] args) 
            System.out.println( "Finally" ); 

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;

 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));

You want subclasses in any package to have access to members of a superclass. Which is the most restrictive access that accomplishes this objective?

Which three are methods of the Object class?

  1. notify();
  2. notifyAll();
  3. isInterrupted();
  4. synchronized();
  5. interrupt();
  6. wait(long msecs);
  7. sleep(long msecs);
  8. yield();

How can we create an unsigned int variable in Java?

What is the value stored in x in following lines of code?
int x, y, z;
x = 0;
y = 1;
x = y = z = 8;

Which of the following package stores all the standard java classes?

What are the pillars of OOPS concept?

Which of these packages contains the exception Stackoverflow in Java?

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

Which of this access specifies can be used for a class so that its members can be accessed by a different class in the same package?

Which of these is returned by operators &, ?


About Us 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.


Follow TechEpi on