Follow Our FB Page << >> for Daily Laughter. We Post Funny, Viral, Comedy Videos, Memes, Vines...

What is the purpose of a statement block?

What is the purpose of a statement block?..

Answer / ranganathkini

A block of statements defines a scope within which the
statements execute. This scope controls how the variables
are accessed by the statements.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Core Java Interview Questions

what is anonymous class in java?

0 Answers  

What are examples of modifiers?

0 Answers  

public class AboutStrings{ public static void main(String args[]){ String s1="hello"; String s2="hel"; String s3="lo"; String s4=s2+s3; //to know the hash codes of s1,s4. System.out.println(s1.hashCode()); System.out.println(s4.hashCode()); // these two s1 and s4 are having same hashcodes. if(s1==s4){ System.out.println("s1 and s4 are same."); }else System.out.println("s1 and s4 are not same."); } } Somebody told me that, == operator compares references of the objects. In the above example even though s1 and s4 are refering to same object(having same hash codes), it is printing s1 and s4 are not same. Can anybody explain in detail why it is behaving like this? Thanks in Advance RavuriVinod

4 Answers   TCS,

Is there any way to skip finally block of exception even if some exception occurs in the exception block?

0 Answers  

how to create multithreaded program? Explain different ways of using thread? : Java thread

0 Answers  

What is member in java?

0 Answers  

What is exception propagation?

0 Answers  

can u handle an error if u write Thowable in the catch class lise try { some errorneous code }catch(Throwable e){ ...}

4 Answers  

How does JAVA ClassLoader work?

1 Answers   IBM,

What is a qualifier in a sentence?

0 Answers  

what is purpose of writting public static void main(Strind arg[]) in java..?

4 Answers   ITC Infotech,

What does || mean in code?

0 Answers