Hello,, If we define any class with static keyword then what does it mean ? Dhawal.
Bosun Bello
Ranch Hand
Joined: Nov 06, 2000
Posts: 1506
posted
0
A class can be defined as static only if it's an inner class. i.e. It's defined inside another class. A static nested class can refer to static methods and variables directly. Bosun
Bosun (SCJP, SCWCD)
So much trouble in the world -- Bob Marley
Dhaval Gandhi
Greenhorn
Joined: Dec 03, 2000
Posts: 15
posted
0
IF WE DEFINE A CLASS WITHOUT STATIC WORD INSIDE ANOTHER CLASS THEN IT WILL MAKE IN DIFFERENCE. ? DHAWAL.
Originally posted by Bosun Bello: A class can be defined as static only if it's an inner class. i.e. It's defined inside another class. A static nested class can refer to static methods and variables directly. Bosun
Cindy Glass
"The Hood"
Sheriff
Joined: Sep 29, 2000
Posts: 8521
posted
0
A BIG difference. You need to read "Getting in touch with your Inner Class" in the Campfire Stories area of this site. Not only does it explain inner classes well (both static and not static) but it is fun to read!!! http://javaranch.com/campfire/StoryInner.jsp
"JavaRanch, where the deer and the Certified play" - David O'Meara