wood burning stoves 2.0*
The moose likes Beginning Java and the fly likes Java Intermediate Queries.... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Java Intermediate Queries...." Watch "Java Intermediate Queries...." New topic
Author

Java Intermediate Queries....

Deepak Lal
Ranch Hand

Joined: Jul 01, 2008
Posts: 507

Please help me out with below questions



1>Can we overload a public static void Main method in java?

2>List L1 = new ArrayList();
List L2 = new ArrayList();
L1=L2;
L2.add("COOL");
System.out.println("L1 ::"+L1); //what will List L1 print in above case ?

3>Can a class be declared as Private ?


When The Going Gets Tougher,The Tougher gets Going
Thomas Thevis
Ranch Hand

Joined: Sep 02, 2008
Posts: 87
Why don't you put these question in the beginner thread and why don't you try it yourself? Put your code into java classes, run them, and if you don't understand the results come back here later and post your questions.
[ September 27, 2008: Message edited by: Thomas Thevis ]

SCJP 5.0, SCJD in progress
marc weber
Sheriff

Joined: Aug 31, 2004
Posts: 11343

Originally posted by Thomas Thevis:
... Put your code into java classes, run them, and if you don't understand the results come back here later and post your questions.

Excellent advice!

The best way to learn is to dive in and practice with test code. (As your signature says, "When the going gets tough...") We're here to help when you need it, but I don't think you need our help with these questions quite yet.
[ September 27, 2008: Message edited by: marc weber ]

"We're kind of on the level of crossword puzzle writers... And no one ever goes to them and gives them an award." ~Joe Strummer
sscce.org
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Java Intermediate Queries....
 
Similar Threads
How to set request attribute on JSP page
javabeat generics question doubt
Important Java Questions
getClass() and enums
Generics Doubt