Search this Site


More books @amazon.com

Home- Interactive Java Exam


After answering the questions click on the "Get Results!! button to see how you have done.

All the best !!!!


What is your name? (not mandatory)
Your name will be stored on the log files along with your score.
 
Please do not overwrite the contents "Name not given", if you do not wish to put your name.

TEST QUESTIONS (Total 27 questions) Over 6000 students have tested!!

Q1. Visualizing program components as objects is characteristics of what language
object oriented programming language
machine language
command line operating system
procedural language
SKIP THE QUESTION


Q2. Attribute of an Object is also know as its


Q3. The java language is architecturally
neutral
oriented
specific
abstract
SKIP THE QUESTION


Q4. All Java application programs must have this method to run


Q5. Command to execute a compiled java programs is
run
execute  
javac  
java
SKIP THE QUESTION


Q6. Identify non-primitive data types in the following declarations
'b'
"base ball'
12.34
true
SKIP THE QUESTION


Q7. Which of the following is not mandatory in variable declaration


Q8. What will be the result of compiling following code
public class MyClass
{
  final int i ;
  public static void main(String[] arguments)
  {
    System.out.println(new MyClass().i);
  }
}

Will print 0
Will give compile error
Will give runtime error

SKIP THE QUESTION


Q9. Which of the following values you can assign to variable of type char
(1) 'A' 
(2)  9 
(3)  "Hello"
(4)  12.3

(1) and (2)
(1), (2) and (3)
(1)
None of the above
SKIP THE QUESTION


Q10. When you attempt to add a float, int and byte the result will be
float
int
byte
double
SKIP THE QUESTION


Q11. The 16 bit coding scheme employed in Java programming is


Q12. Which of the following statements are true
(1) A series of statements written to perform a particular task is called
"procedure" in Java
(2) The return type for a method can be any Java type, including void

(3) An important principal of object oriented programming is implementation hiding
(4) When you perform mathematical calculations on the unlike data type, java will perform  a implicit conversion to unify the types



Q13. Which of the following is not a method access modifier in Java 1.2
private
protected
public
private protected
SKIP THE QUESTION


Q14. A method named HelloWorld() is void and takes no arguments. If you have to define this method, which of the following is correct declaration
HelloWorld();
HelloWorld(void);
void HelloWorld();
void HelloWorld(void);
SKIP THE QUESTION


Q15. A method name min() that needs two integer arguments is declared as
public void min();
public void min (int a, b);
public void min (int a, int b);
public int min (a, b);
SKIP THE QUESTION


Q16.You store java source code files with following extension ?
.java
.class
.src
.javadoc
SKIP THE QUESTION


Q17. Java language has support for which following types of comments


Q18. In Java language, the argument to the method is within 


Q19.State which of the following statements are true 
(1) A series of characters that appear in double quote is a Char literal
(2) Java language is case sensitive
(3) The Java programming language is both compiled and interpreted.
(4) As long as a computer has a Java Virtual Machine, the same program written in the Java programming language can run on any computer


Q20.What will be the result of compiling following code 

 public class MyClass 
 {
  public static void main(String args[])
  {
    System.out.println("In first main()");
  }
  public static void  main(char args[]) 
  {
    System.out.println('a');
  }
 }

(1) Code will not compile and will give "Duplicate main() method declaration" error
(2) Code will compile correctly but will give a runtime exception
(3) Code will compile correctly and will print "In first main()" (without quotes) when run with argument of 'a'.
(4) Code will compile correctly and will print "a" (without quotes) when run with argument of 'a'.
SKIP THE QUESTION


Q21.Which are the valid declarations for an integer literal 
(1) 0
(2) -5
(3) 0416
(4) 0xabcdef


Q22.A subclass is also called as
inner class
nested class
derived class
hidden class

SKIP THE QUESTION


Q23.State which of the following statements are True 
(1) Java language support multi-dimentional arrays 
(2) StringBuffer  class is alternative to String class 
(3) A class which you create only to extend from, but not to instantiate
from is called derived class
(4) You cannot instantiate objects of interfaces or abstract classes.


Q24.State which of the following statements are True 
(1) Each method in a parent class can be overridden at most once in any one subclass
(2) A method can be overloaded in the class it is defined as well as in the subclass of its class
(3) Overriding methods must return exactly the same type as the method they override
(4) An overriding method must not be less accessible than the method it
overrides


Q25.What will be the outcome of executing following code. 
class MyClass
{
 public static void main(String []args)
 {
   final int i = 100;
   byte b = i;
   System.out.println(b);
 }
}

Will give compilation error
Will compile and print 100
Will throw an exception

SKIP THE QUESTION


Q26.What will be the outcome of executing following code. 
class MyClass
{
  public static void main(String []args)
  {
   int i = 100;
   byte b = i;
   System.out.println(b);
  }
}
Will give compilation error
Will compile and print 100
Will throw an exception
SKIP THE QUESTION


Q27.What will be the outcome of executing following code.
class MyClass
{
  public static void main (String args[])
  {       
   String s1[] = new String[5];
   String str = s1[0].toUpperCase();
   System.out.println(str);  
  }
}

Will print null
Will give NullPointerException
Will not compile
Will print NULL

SKIP THE QUESTION


       


If you like this quiz or if you have any suggestions which will help me to improve it, please email me your feedback at sandeepnachane@yahoo.com

MAIN MENU

BEFORE YOU BEGIN

Certification FAQ
Certification Objectives

TICKLE YOUR GRAY CELLS

Interactive Sample Java Test
Over 6000 students have  tested !

Object Equivalence 

Threads

SCJP STUDY TOOLS

Study Tips

Certification Books

Other Certification Sites

Tutorials

SCJP Revision Tips 

MISCELLANEOUS LINKS

Java Magazines

Java IDE's

Career Related Websites



Complete Java 2 Training Course

 

Page Last Modified: 25 January, 2001

 

Disclaimer     © 2000-01 Sandeep Nachane Feedback