• Post Reply Bookmark Topic Watch Topic
  • New Topic

execution of class file  RSS feed

 
Raj Gurung
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi there,
i am a beginner.
i have got 2 classes in a source file, 1 real class and 1 test class with main() method.
while executing with java command which class name should i write - real class or test class???
thanks
 
Carey Brown
Saloon Keeper
Posts: 3323
46
Eclipse IDE Firefox Browser Java MySQL Database VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Use the one that has a main().
 
fred rosenberger
lowercase baba
Bartender
Posts: 12563
49
Chrome Java Linux
  • Likes 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
and if they both have a main, use the class name that has the main you want to run.
 
Raj Gurung
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks i will try!!!
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!