What are blocks?.



What are blocks?...

Answer / amit singh

blocks is a group of single and compound statements
between the braces { }
class Amit
{
Amit()
{
Sysem.out.println("constructor");
}
{//begin block instance itializer block

System.out.prinln("amit");

}//end the block

psvm(String [] args)
{

boolean b=true;

if(b)
{//begin block

System.ou.println("boolean");

}//end of block
.
.
.//crete objec in psvm
.

Is This Answer Correct ?    2 Yes 0 No

Post New Answer

More Core Java Interview Questions

What is difference between call by value and call by reference?

0 Answers  


Can substring create new object?

0 Answers  


When arithmeticexception is thrown?

0 Answers  


What if constructor is protected in java?

0 Answers  


What are the basic control structures?

0 Answers  






whether java is fully object oriented language or partially object oriented language

4 Answers   Infosys, ME, SMK,


Suppose i have two threads t1 and t2 are running.How the main thread will know that the two threads t1,t2 execution has completed?

2 Answers   Subex,


What is the maximum size of array in java?

0 Answers  


Explain about varargs in java?

0 Answers  


What are methods in java?

0 Answers  


what is the difference between applet and swing and gui application in java . What we do with the collections set and list interface

2 Answers   CTS, Phoenix Technologies,


Can java list contain duplicates?

0 Answers  


Categories