This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes Help With not using test classes Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Help With not using test classes" Watch "Help With not using test classes" New topic
Author

Help With not using test classes

Suryakant Gokhale
Greenhorn

Joined: Dec 26, 2008
Posts: 1
hi folks !
in head first java author sometimes doesn't uses test classes and puts the main inside the class to be tested .
is it the same thing as putting the main in some other test class.
what if there are many objects of that class i.e many main functions.
I know static has to do something with it.
can anyone please help
Reehan Lalkhanwar
Ranch Hand

Joined: Jun 16, 2007
Posts: 106
Yes, you are right, its the static part that ensures that for all objects of the class of that particular type, inside which a static variable or method exists, only one copy is made and is made available, the same copy, to all the objects of that class type.
Can you please give any example from the book for reference?


Thank you,
Reehan
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Help With not using test classes
 
Similar Threads
Unit test code organization...
Can we Overload the main() Method?
singletone pattern
A Package Question
Main class naming convention