ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
Do you have a collection of Interview Questions and interested to share with us!!
Please send that collection to along with your userid / name. ThanQ
Google
 
Categories  >>  Software  >>  Core Java  >>  Java J2EE  >>  Java Related
 
 


 

 
 Core Java interview questions  Core Java Interview Questions
 Advanced Java interview questions  Advanced Java Interview Questions
 Swing interview questions  Swing Interview Questions
 EJB interview questions  EJB Interview Questions
 Servlets interview questions  Servlets Interview Questions
 Struts interview questions  Struts Interview Questions
 JDBC interview questions  JDBC Interview Questions
 JMS interview questions  JMS Interview Questions
 SunOne interview questions  SunOne Interview Questions
 J2EE interview questions  J2EE Interview Questions
 Weblogic interview questions  Weblogic Interview Questions
 Websphere interview questions  Websphere Interview Questions
 Java Networking interview questions  Java Networking Interview Questions
 Java J2EE AllOther interview questions  Java J2EE AllOther Interview Questions
Question
what is the replacement for GOTO in java?
 Question Submitted By :: Priyavarzhni
I also faced this Question!!     Rank Answer Posted By  
 
  Re: what is the replacement for GOTO in java?
Answer
# 1
continue
 
Is This Answer Correct ?    1 Yes 3 No
Firoz
 
  Re: what is the replacement for GOTO in java?
Answer
# 2
break with label and continue with label.
1. Break with label
loop1:  	for (int i = 0;  i < 10; i++)
		{
loop2:		for ( int j = 0; j < 10; j++)
			{
				System.out.println(i);
				if( i + j > 10 )
 		       			break loop1;
			}
		}

2. continue with label

loop1:  	for (int i = 0;  i < 10; i++)
		{
loop2: 		for ( int j = 0; j < 10; j++)
			{
				if(i + j == 5)
	 	     			continue loop1;
				System.out.println(j);
			}
		}
 
Is This Answer Correct ?    1 Yes 4 No
Devesh Dashora
 
 
 

 
 
 
Other Core Java Interview Questions
 
  Question Asked @ Answers
 
They had given one progam final HashMap hm=new HashMap(); public void show() { hm.put("name",value); } in this prg here the final hashtable value can be changed in put method,its the prg run? DNS2
Difference between JDK, JRE, JVM Oracle5
Create a form of user Login in JSP, that accepts the user name and password from user and authenticate it with user names and passwords stored in database. (Plz provide me answer immediately)  1
what is difference between Exception and Error?  14
what is use of business objects? Tech-Mahindra3
What are the parameters used in Connection pooling? IBM1
What is meant by controls and types?  1
What is the life cycle of an Applet ?  1
What is the Layout for ToolBar?  1
Is 'null' a keyword?  3
Why Java is a platform independent language? Zensar4
how can u handle run time exception in java? explain with brief explanation with examples? CTS2
How can we handle runtime exceptions? write one sample program? Can we write runtime exceptions beside the throws key word? if yes write sample program? Huawei1
What is an abstract class? Wipro5
Can you have an inner class inside a method and what variables can you access?  2
could you run the java program without main method?  3
What is garbage collection in Java, and how can it be used ? Wipro10
What are Advatages of Overloading and Overridding. TCS3
When does Exception occurs?  3
What services that container provides?  1
 
For more Core Java Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com