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                      
info       Did you received any Funny E-Mails from your Friends and like to share with rest of our friends? Yeah!! you can post that stuff   HERE
Google
 
Categories >> Software >> Java-Related
 
  J2ME (102)  Java-Related-AllOther (32)
 


 

Back to Questions Page
 
Question
could you run the java program without main method?
Rank Answer Posted By  
 Question Submitted By :: Naga
I also faced this Question!!   © ALL Interview .com
Answer
yes,we can write and run a java program without using the
main method.
i.e By using static

example program...!

public void static( )
public class
{
public void static( )
{
System.out.println( "Without main method" );
System.exit(0);
}
}
 
0
Naga
 
 
Question
Accenture NJ mostly ask question on Collection like
1)How to sort Objcts and how treeset sort them
2)Explain mechanism of Hashcode finding in Java
3)Name some of the Sorted collection.
Rank Answer Posted By  
 Question Submitted By :: Guest
This Interview Question Asked @   Accenture
I also faced this Question!!   © ALL Interview .com
Answer
The answer to all this question is easy but i think they 
want answer from internal mechanism how it works inside 
Java!!!
You think you answered well but they will always fail you 
just hate then
 
0
Guest
 
 
Question
Given:
11. public static void main(String[] args) {
12. Integer i = uew Integer(1) + new Integer(2);
13. switch(i) {
14. case 3: System.out.println(”three”); break;
15. default: System.out.println(”other”); break;
16. }
17. }
‘What is the result?
1		three
2		other
3		An exception is thrown at runtime.
4		Compilation fails because of an error on 
line 12.
Rank Answer Posted By  
 Question Submitted By :: Rakesh
I also faced this Question!!   © ALL Interview .com
Answer
Compilation fails because of an error on
 
0
Harish
 
 
 
Answer
Three will be the answer.
 
0
Amit Mittal
 
 
Question
Given:
1. package test;
2.
3. class Target {
4. public String name = “hello”;
5. }
What can directly access and change the value of the 
variable name?
1		any class
2		only the Target class
3		any class in the test package
4		any class that extends Target
Rank Answer Posted By  
 Question Submitted By :: Rakesh
I also faced this Question!!   © ALL Interview .com
Answer
any class
 
0
Dilip
 
 
Answer
any class in the test package
 
0
Ram
 
 
Answer
any class that extends Taget
 
0
Lakshman
 
 
 
Back to Questions Page
 
 
 
 
 
   
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