Results 21 to 26 of 26
Thread: main method String
- 09-19-2011, 08:17 PM #21
Member
- Join Date
- Sep 2011
- Location
- India
- Posts
- 44
- Rep Power
- 0
- 09-19-2011, 08:18 PM #22
Re: main method String
Its a waste of time worrying about it. It works and works every time.
In some countries cars drive on the righthand and in some on the lefthand side of the road. That's the way it is.
- 09-19-2011, 08:22 PM #23
Member
- Join Date
- Sep 2011
- Location
- India
- Posts
- 44
- Rep Power
- 0
Re: main method String
ya right.. But my actual thinking is... why the java author said every java progrm runs from main... why it's run other methods?
- 09-19-2011, 08:24 PM #24
Re: main method String
- 09-19-2011, 08:30 PM #25
Member
- Join Date
- Sep 2011
- Location
- India
- Posts
- 44
- Rep Power
- 0
Re: main method String
thank you sir. and last and final qust.. what's the difference b/w string and string buffer...? dont say string is immutable and string buffer is mutable..
if you try this prgram you found that string is mutable:
class str{
public static void main(String args[]){
String s1="java";
String s2="prg";
s1=s1+s2;
System.out.println(s1);
}
}
o/p: java prg.
If strings are immutable, why the java interprter gives javaprg is the output....?
- 09-19-2011, 08:58 PM #26
Re: main method String
Don't ask the same question in more than one thread.
String vs stingBuffer
As you appear to have finished with the question you asked in this thread, I'm locking it.
db
Similar Threads
-
Main Method
By maya700 in forum New To JavaReplies: 13Last Post: 07-23-2011, 08:41 AM -
main method
By 007 in forum New To JavaReplies: 18Last Post: 06-25-2011, 01:47 PM -
Running main method class from another main class
By tlrocketman in forum New To JavaReplies: 3Last Post: 12-06-2010, 08:30 AM -
Calling The main method from another method
By SwissR in forum New To JavaReplies: 3Last Post: 07-27-2010, 11:03 AM -
calling method from main method
By bob_bee in forum New To JavaReplies: 4Last Post: 10-02-2009, 05:30 PM


1Likes
LinkBack URL
About LinkBacks

Bookmarks