What are blocks?.
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 |
Can a class extend more than one class?
Difference between prefix and postfix forms of the ++operator?
What is meant by data hiding/encapsulation?
What is the difference between reader/writer and inputstream/output stream?
How to print nodes of a Binary tree?
What is the difference between object oriented programming language and object based programming language?
What is string and example?
What is the difference between interface & abstract class?
What is the use of runnable interface?
Can we serialize singleton class?
Can we pass a primitive type by reference in java? How
if two references are having same hash codes,is that means those are refering to same object?