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

What is double parsedouble in java?

550


How do you write a scanner class in java?

568


What is the difference between compile-time polymorphism and runtime polymorphism?

569


What is null mean in java?

627


What is super in java?

575






Can you declare the main method as final?

527


What is entry set in java?

539


What are the main uses of this keyword?

601


What is the difference between public, private, protected, and friend access?

572


What is the difference between scrollbar and scrollpane?

612


How to reverse a string in java?

526


How do you create a reference in java?

512


What do you mean by JVM?

591


What is json parser in java?

617


What are the supported platforms by java programming language?

573