• Post Reply Bookmark Topic Watch Topic
  • New Topic

How do you properly invoke a method  RSS feed

 
Papi Escobar
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How do I properply call a public method? I would like to use the String getFullname in another class.

 
Stephan van Hulst
Saloon Keeper
Posts: 7973
143
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Assuming your class is named Person, you need to create an instance of Person with the new keyword, and then call getFullname() on that instance: person.getFullname().

Have you read the Oracle tutorials?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!