Sunday, 9 November 2014

Hello Friends,


Here are few videos which will help you to increase your brain power, this will really motivate you and help you to increase your concentration on Studies.























        "YOU MIGHT ALSO LIKE" Widget to Blogger.


Hi Friends,

Do you want the readers navigate to similar or related posts in your blog and you want to add a Widget to show them.

Here are the few quick steps which will help you to do that:


  • Now you need to fill your email ID and web URL on the Right side down as shown in below figure.
  • Click on the Get Widget! and you will be asked to click install Widget as shown below and click on Install Widget.
  • Once you click on install Widget , you will be redirected to Blogger page and follow the below instruction.
  • Select a blog if you have more than one, then click on Add Widget.
  • For better performance, Drag and Drop the LinkWithin box under the "Blog Posts" box and Click Save.


You are done, now the Widget will appear on your Blog.





Java Quiz Question and Answers - Part 9

                         Java Quiz Exam Oriented


Answers are marked with light yellow.

Question 1: interface can have only static variables.
Select one:
True 
False

Question 2: default is the default access specifiersin class and interface.
Select one:
True 
False

Question 3: notify() method is defined in Object class.
Select one:
True 
False

Question 4: In jdk1.7 and later, underscore characters "_" can appear anywhere between digits in a numerical literal.
Select one:
True 
False

Question 5: abstract class can have parameterized constructor.
Select one:
True 
False

Question 6: we can define individual anonymous class in java program .
Select one:
True
False 

Question 7: In StringBuffer class, equals() method checks the content.
Select one:
True
False 

Question 8: main() method can be overloaded.
Select one:
True 
False



Java Quiz Question and Answers - Part 8

                            Java Quiz Exam Oriented 

Answers are marked with light yellow.

Question 1: constructor can be declared as private.
Select one:
True 
False

Question 2: we can write constructor in interface .
Select one:
True
False

Question 3: Graphics is an abstract class.
Select one:
True 
False

Question 4: no need to import java.lang package explicitly in java program.
Select one:
True 
False

Question 5: Class is a predefined class in java.
Select one:
True 
False

Question 6: predefined class name can be used as variable name.
Select one:
True
False

Question 7: CheckBox is a predefined class.
Select one:
True
False

Question 8: private methods can't be overloaded.
Select one:
True
False

Question 9: Every method of a final class is implicitly final.
Select one:
True 
False

Java Quiz Question and Answers - Part 6

                       Java Quiz Exam Oriented



Question 1: A class Sample could have a member named sample.
Select one:
True
False

Question 2: we can represent floating point number in hexa decimal format.
Select one:
True
False

Question 3: we can represent floating point number in hexa decimal format.
Select one:
True
False

Question 4: we can implement operator overloading in java
Select one:
True
False

Question 5: Empty java file is valid.
Select one:

True
False


Question 6:  goto is a resreved word  in java
Select one:

True
False

Question 7: we can use unicode characters to write a program in java
Select one:

True
False


Question 8: At compilation time,java compiler import java.lang implicitly.
Select one:
True
False

Java Quiz Question and Answers - Part 7

                                Java Quiz Exam Oriented


Answers are marked with light yellow.

Question 1: It is possible to have two methods in the same class that have the same name, the same number and types of arguments, but different return types.
Select one:

True
False 


Question 2: The finally block is executed when an exception is thrown, even if no catch matches it.
Select one:

True 
False


Question 3: finalize() is a predefinedmethod
Select one:

True 
False


Question 4: An interface can inherit from multiple interface.
Select one:

True 
False


Question 5: The subclass exception should precede the base class exception when used within the catch block.
Select one:

True 
False


Question 6: package statement must be first statement in java program.
Select one:

True 
False


Question 7: sleep(int k) method throws checked exception.
Select one:

True 
False


Question 8: we can create an array with zero size.
Select one:

True 
False

Java Quiz Question and Answers - Part 5

                             Java Quiz Exam Oriented


Question 1: Out is a predefined instance variable of the type Printstream class.
Select one:
True
False


Question2: super keyword calls super class constructor.
Select one:

True
False


Question 3: + acts as polymorphic behavior in java
Select one:
True
False  


Question 4: if the class is declared as final,the class canot be extneded.
Select one:
True
False


Question 5: A package statement can occur either before or after import statements.
Select one:
True
False


Question 6: It is possible to have two methods in the same class that have the same name, the same number and types of arguments, but different return types.
Select one:
True
False


Question 7: In every constructor ,compiler will write super(), if super() is  not there.
Select one:
True
False


Question 8: Any class member except a constructor can be static.
Select one:
True
False



Java Quiz Question and Answers - Part 4

                       Java Quiz Exam Oriented


Question 1:  we can call static method with object name.
Select one:
True
False

Question 2: we can declare an int array without size.
Select one:
True
False

Question 3: Private methods can be  overridden in sub class
Select one:
True
False

Question 4: equals() is ovveriden in StringBuffer class.
Select one:
True
False

Question 5: && operator only applied to boolean operations.
Select one:
True
False

Question 6: A class cannot overload its constructors
Select one:
True
False  

Question 7: sub class object can access super class members including private members.
Select one:
True
False

Question 8: even no main  method ,your java program  will compile
Select one:
True
False

Question 9: default value for class type variable is NULL.
Select one:
True
False

Question 10: there is no constraint, having public classes in a java file.
Select one:
True
False



Java Quiz Question and Answers - Part 3

                          Java Quiz Exam Oriented

Question 1: Which of these is data type long literal?
Select one:
a. ABCDEFG
b. 99671246
c. 0x99fffa
d. 0x99fffL

Question 2: JIT stands for
Select one:
a. Java Interpreter Time
b. Just In Time
c. Just In Text  
d. Job In Time

Question 3:  You want subclasses in any package to have access to members of a superclass. Which is the most restrictive access that accomplishes this objective?
Select one:
a. public
b. private
c. transient
d. protected

Question 4:  What is stored in the object obj in following lines of code?
                    box obj;
 Select one:
a. garbage
b. Any arbitrary pointer
c. Memory address of allocated memory of object.
d. null

Question 5: What is the output for the below code?
public class A {
int k;
boolean istrue;
static int p;
public void printValue() {
System.out.print(k);
System.out.print(istrue);
System.out.print(p);
}
}
public class Test{
public static void main(String argv[]){
A a = new A();
a.printValue();
}
}
Select one:

a. 0 0 0
b. Compile error ­ static variable must be initialized before use
c. 0 true 0
d. 0 false 0

Question 6:
we can't write constructor explicitly in the class.
Select one:

True
False

Question 7: Which four options describe the correct default values for array elements of the types indicated?
int -> 0
String ­-> "null"
Dog ­-> null
char ­-> '\u0000'
float ­-> 0.0f
boolean ­-> true
Select one:
a. 2, 4, 5, 6
b. 3, 4, 5, 6
c. 1, 3, 4, 5
d. 1, 2, 3, 4

Question 8: jvm is machine dependent.
Select one:
True
False

Question 9: Which of the following statements is correct?
Select one:
a. public method is accessible to all other classes in the hierarchy
b. public method is accessible only to subclasses of its parent class
c. public method can be accessed by calling object of the public class. Incorrect
d. public method can only be called by object of its class.

Continued...





Java Quiz Question and Answers - Part 2

                       Java Quiz Exam Oriented

 Answers are marked with light yellow.
Question 1: In a single java file, we can have _________ number of classes.
Select one:a. 3
b. 1
c. 4
d. any

Question 2: default is a keyword in java
Select one:
True
False

Question 3: Which of these statements is correct?
Select one:
a. true and false are non numeric values.
b. true and false are numeric values 0 and 1.
c. true is any non zero value and false is 0.
d. true and false are numeric values 1 and 0.

Question 4: Which of these statements are incorrect?
Select one:
a.
Assignment operators are more efficiently implemented by Java run­time system than their equivalent long forms.

b. Assignment operators can be used only with numeric and character data type. Incorrect
c. None
d. Assignment operators run faster than their equivalent long forms.

Question 5: Which of these statement is incorrect?
Select one:

a. Applets do not require a main() method at all.
b. Every class must contain a main() method.
c. There can be only one main() method in a program.
d. main() method must be made public.

Question 6: What is the range of data type short in Java?
Select one:

a. -128 to 127
b. -32768 to 32767
c. -2147483648 to 2147483647
d. None of the mentioned

Question 7: public class Test { }
During compilation, it generates default one argument constructor.
Select one:

True
False


Question 8:
which methods we can call with class name?
Select one:a. native
b. static
c. synchronized.
d. instance

Continued ...






Java Quiz Question and Answers - Part 1


                   Java Quiz Exam Oriented - Part 1

Let us see few Java Questions and the respective answers which will be asked frequently:

Answers are marked in light yellow.

Question 1: 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);
} } }Select one:
a. 8
b. compilation error
c. 9
d. runtime error

Question 2: Which of the following is a method having same name as that of it's class?
Select one:
a. delete
b. finalize
c. class
d. constructor 

Question 3: Which of these operators is used to allocate memory for an object?

Select One:
a. give
b. alloc
c. malloc
d. new

Question 4: Which three are valid declarations of a char?
1                   char c1 = 064770;2                   char c2 = 'face';3                   char c3 = 0xbeef;4                   char c4 = \u0022;5                   char c5 = '\iface';6                   char c6 = '\uface';
Select one:
a. 1, 3, 6
b. 5 only
c. 3, 5
d. 1, 2, 4

Question 5: Which of these lines of code will give better performance?
1.                a | 4 + c >> b & 7;
2.               (a | ((( 4 * c ) >> b ) & 7 ))Select one:
a. Dependent on the computer system.
b. 2 will give better performance as it has parentheses.
c. 1 will give better performance as it has no parentheses.
d. Both 1 & 2 will give equal performance.

Question 6: What is the output for the below code ?
public class Test {
public static void main(String[] args){
int i = 010;
int j = 07;
System.out.println(i);
System.out.println(j);
}
}Select one:
a. 8    7
b. 10   7
c. Compilation fails with an error at line 3
d. Compilation fails with an error at line 5

Question 7: Which of these selection statements test only for equality?
Select one:
a. switch
b. none of the mentioned
c. if
d. if and switch

Question 8: Which one of these lists contains only Java programming language keywords?
Select one:
a. class, if, void, long, Int, continue
b. goto, instanceof, native, finally, default, throws 
c. byte, break, assert, switch, include
d. try, virtual, throw, final, volatile, transient
e. strictfp, constant, super, implements, do

More Questions are available in series