Online Test

:

 

What is Truncation is Java?


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 statement is true about a static nested class?


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

Which is a valid keyword in java?


A _________ is a basic unit of storage in Java.


Which of these is an incorrect Statement?


Which of these packages contains the exception Stackoverflow in Java?


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


JAR stands for?


What are the pillars of OOPS concept?


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


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 of the following operators can operate on a boolean variable?
1. &&
2. ==
3. ?:
4. +=


What will be the output of the program?

public class Foo 
{  
    public static void main(String[] args) 
    {
        try 
        { 
            return; 
        } 
        finally 
        {
            System.out.println( "Finally" ); 
        } 
    } 
}

 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 of these is returned by operators &, ?


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


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 of the following are Java reserved words?

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

Which two of the following methods are defined in class Thread?

  1. start()
  2. wait()
  3. notify()
  4. run()
  5. terminate()

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

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


What allows the programmer to destroy an object x?


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

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