Quiz
Java Level Knowledge Assessment
Create a free account to finish this quiz
Save your progress and see your final score.
Already have an account? Sign in
Questions in this quiz (13)
1What is Encapsulation?
- AEncapsulation is a technique to define different methods of same type.
- BEncapsulation is the ability of an object to take on many forms.
- CEncapsulation is the technique of making the fields in a class private and providing access to the fields via public methods.
- DNone of the above.
2What is polymorphism in Java?
- AIt is when a single variable is used with several different types of related objects at different places in a program.
- BIt is when a program uses several different types of objects, each with its own variable.
- CIt is when a single parent class has many child classes.
- DIt is when a class has several methods with the same name but different parameter types.
3Select Access Modifiers
- APrivate
- BStatic
- CProtected
- DAbstract
- EPublic
- FFinal
4The following is correct
for(int i, i<10, i++ ){
}- ATrue
- BFalse
5Method Overloading is a feature that allows a class to have more than one method having the same name, if their argument lists are different.
- ATrue
- BFalse
61. Which of the following, if any, is an invalid array declaration?
- AString[] names = new String[5];
- BString names[] = new String[5];
- CString[] names = {"one", "two"};
- Dall are valid
7Overriding is a feature that enables a child class to provide different implementation for a method that is already defined and/or implemented in its parent class or one of its parent classes.
- ATrue
- BFalse
8Object-Oriented Programming refers to a programming methodology based on objects, instead of just functions and procedures. These objects are organized into classes, which allow individual objects to be group together.
- ATrue
- BFalse
9 Which of the following is a correct syntax for implementing inheritance
- Aclass Jolt isa SoftDrink { //additional definitions go here }
- Bclass Jolt implements SoftDrink { //additional definitions go here }
- Cclass Jolt defines SoftDrink { //additional definitions go here }
- Dclass Jolt extends SoftDrink { //additional definitions go here }
10Select types of variable
- Aint
- Bfinal
- Cstatic
- Ddouble
- EString
11Suppose your method does not return any value, which of the following keywords can be used as
a return type?- Apublic
- Bdouble
- Cint
- Dvoid
- ENone of the above
12Which of the following is the general scheme for a class definition:
- AClass ClassName
{
// Description of the instance variables.
// Description of the constructors.
// Description of the methods.
} - Bclass ClassName
{
// Description of the instance variables.
// Description of the constructors.
// Description of the methods.
} - CClassName
{
// Description of the instance variables.
// Description of the constructors.
// Description of the methods.
} - Dclass ClassName
{
public static void main ( String[] args )
{
// entire program goes here
}
}
- AClass ClassName
13The following syntaxis is correct:
private int cont = 0;- ATrue
- BFalse
Information
- Description
- Quiz on Java Level Knowledge Assessment, created by daniel maya on 18/09/2017.
- Author
- daniel maya
- Language
- English
- Views
- 1
- Rating
- No ratings yet Rate this quiz