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
What does string intern() method do?
Is hashset ordered java?
Explain the difference between an Interface and an Abstract class?
What is replacefirst in java?
I want my class to be developed in such a way that no other class (even derived class) can create its objects. How can I do so?
What are default methods ?
What is the arraylist in java?
What is the difference between iterator and list iterator?
What is data type example?
In multi-threading how can we ensure that a resource isn't used by multiple threads simultaneously?
Write a program to print all permutations of string?
Explain about static imports in java?
Can you override static methods?
Can private class be extended java?
What is finally in Java?