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 |
there are some duplicate values in ArrayList, how U'll get that array with out duplicate?
What is :: operator in java 8?
How do you declare an array in java?
why string constant pool in java
Where is the singleton class used?
What is ‘has a’’ relationship in java?
Difference between an argument and a parameter?
10 Answers Accounting, HCL, IBM, Quinnox,
Can we sort set in java?
Can we write class inside a class in java?
1) Find the Merge point of two linked lists. 2) Swap two bits of integer. 3) Reverse individual words of the sentence. 4) Reverse string without using temp string.
Name the packages in JDK?
How to convert a string to long?