Chris Armstrong

Greenhorn
+ Follow
since Jul 01, 2002
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Chris Armstrong

Hi All,
Mughal says page 181,
"private methods in a class cannot be overridden"
-----------------------------------------------
class fruit {
private String getFruit(String name) {
System.out.println(name);
return "apple";
}
}
class pears extends fruit {
String getFruit(String name) {
return "apple";
}
}
public class grapes {
public static void main(String args[]) {
pears p = new pears();
System.out.println(p.getFruit(""));
}
}
---------------------------------------------
but in the above am able to compile the program even though a private method is being overriden ?
Armstrong
Hello
can some one tell me the diff between throw and throws with a an example
Thanks
Hi,
Can anyone explain to me what is return and how it works
am getting confused with: return; &
return <expression>;
Thank you in Advance
Armstrong
Nelson
I would recommend you to buy three books
1. first is Sam's learn java in 21 days
2. Java Certification by Khalid A. Mughal and Rolf W. Rasmussen (best book)
3. Sun certified Java Programmer bye Bill Brogden
the 1st book is for learning java from basic
the 2nd one which will prepare you for the exam
3rd one is a Exam Cram
I also suggest you to visit http://www.javaranch.com/maha/
"Those who Trust in the Lord They will never be ashamed " - The Bible
Armstrong