| Author |
Some basic but important queries:: please Help
|
Somesh Rathi
Ranch Hand
Joined: Apr 27, 2006
Posts: 31
|
|
Hello Friends, I have some basic queries as follows. 1.Why is the syntax of main()is always public static void main(). Please explain importance of each keyword separately. 2.In Java ,there are no pointers. So what is alternative to pointers ? How can we implement linked list ? Please explain with example. 3. What is different between Error & Exception ? When each of them should be used ? 4. Thread can be created by a) extending Thread class or b) by implementing runnable interface Which is the best way to create thread ? Why ? Many thanks in advance. I am looking forward for your much needed help. Please reply ASAP. Regards, Somesh.
|
 |
Barry Gaunt
Ranch Hand
Joined: Aug 03, 2002
Posts: 7729
|
|
|
This forum is not meant for homework or interview questions. Or can you perhaps give us the reference to the SCJP mock exam where you found the questions.
|
Ask a Meaningful Question and HowToAskQuestionsOnJavaRanch
Getting someone to think and try something out is much more useful than just telling them the answer.
|
 |
Somesh Rathi
Ranch Hand
Joined: Apr 27, 2006
Posts: 31
|
|
My apologies for it However please let me know the right forum for it. Please let me know the solutions for my questions. Many thanks in advance..
|
 |
Barry Gaunt
Ranch Hand
Joined: Aug 03, 2002
Posts: 7729
|
|
Basically we have no forum where the work is done for you. You may attempt the questions yourself and ask whether your interpretation of the questions or your answers are on the right track. We prefer to help those who are willing to show some effort to solve their own problems. Moving to Java In General (Beginner).
|
 |
satishkumar janakiraman
Ranch Hand
Joined: May 03, 2004
Posts: 334
|
|
1.Why is the syntax of main()is always public static void main(). Please explain importance of each keyword separately. 2.In Java ,there are no pointers. So what is alternative to pointers ? How can we implement linked list ? Please explain with example. 3. What is different between Error & Exception ? When each of them should be used ? 4. Thread can be created by a) extending Thread class or b) by implementing runnable interface Which is the best way to create thread ? Why ?
[ Remarkable display of inattention elided ] bye for now sat  [ February 08, 2007: Message edited by: Ernest Friedman-Hill ]
|
 |
Jesper de Jong
Java Cowboy
Bartender
Joined: Aug 16, 2005
Posts: 12921
|
|
Somesh, please do some studying yourself. That way you will really learn what it all means - you won't really learn it when somebody just tells you the anwer to your homework questions. Study and learn it yourself. You can find the answer to all of your questions in The Java Tutorial. For example: This explains what public means: Controlling Access to Members of a Class This explains what static means: Understanding Instance and Class Members This explains what void means: Returning a Value from a Method
|
Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 7 API documentation
Scala Notes - My blog about Scala
|
 |
 |
|
|
subject: Some basic but important queries:: please Help
|
|
|