Online Test

:

 

A _________ is a basic unit of storage in Java.


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


Which is a valid keyword in java?


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.


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 package stores all the standard java classes?


JAR stands for?


Which of these is returned by operators &, ?


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 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?


What is Truncation is Java?


Which constructs an anonymous inner class instance?


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 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 will this code print?
int arr[] = new int [5];
System.out.print(arr);


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


What is the range of data type short in Java?


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


What allows the programmer to destroy an object x?


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


What are the pillars of OOPS concept?


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

What will be the output of the program?

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

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