What are blocks?.

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain 5 features introduced in jdk 1.7?

713


what is deadlock? : Java thread

615


Explain the inheritance?

666


How many decimal digits is 64 bit?

621


How are the elements of a gridbaglayout organized in java programming?

630






How does hashmap work in java ?

624


Is ruby built on java?

620


How do you create immutable object in java?

627


Why are global variables used?

592


What are the loops in java?

614


What does math floor () do?

649


What are 3 data types?

635


Why main() method is public, static and void in java ?

688


What is outofmemoryerror in java?

655


What are static blocks and static initalizers in java ?

653