Ken Morgan

Greenhorn
+ Follow
since Nov 10, 2000
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Ken Morgan

System.out.println writes output to the DOS screen. How do you clear the screen to prepare for the output?
23 years ago
System.out.println writes output to the DOS screen. How do you clear the screen to prepare for the output?
23 years ago
Does Java keep only one copy of a method in memory regardless of whether the method is static or non-static? Or are methods like variables--static methods: only one copy; non-static methods: one copy per object.
23 years ago
I am in the unfortunate position of trying to learn Java at the same time that I'm teaching it! Our textbook is "Java: How to Program," 3rd ed., by Deitel and Deitel. It leaves much to be desired. But I have two questions about objects of class String.
(1) Why don't they need to be created using "new"? The declaration "String str" seems to be sufficient. Deitel says (p. 134) that all objects are created using "new."
(2) Deitel says (p. 370) that objects of class String are "immutable"--cannot be changed after being created. Yet in the very example program he is discussing (p. 369), he declares "String output" and then has numerous lines "output +=..." that obviously CHANGE "output." What is the explanation of this inconsistency?
Thanks
23 years ago