File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
    Bookmark Topic Watch Topic
  • New Topic

Declaration and Access Control

 
Astha Sharma
Ranch Hand
Posts: 250
Android Eclipse IDE Java
  • 0
  • Mark post as helpful
  • send pies
  • Report post to moderator

Hi friends...
I am having a problem in understanding why this code is giving error. Please help...
 
Ankit Garg
Sheriff
Posts: 9497
22
Android Google Web Toolkit Hibernate IntelliJ IDE Java Spring
  • 0
  • Mark post as helpful
  • send pies
  • Report post to moderator
Your code is missing curly brackets for the main method...
 
Astha Sharma
Ranch Hand
Posts: 250
Android Eclipse IDE Java
  • 0
  • Mark post as helpful
  • send pies
  • Report post to moderator
oops...i did it by mistake :O
but if i am putting curly brackets, then also its giving an error. Let me post the modified code in new thread.
thanks
 
Aniket S. Kulkarni
Ranch Hand
Posts: 87
Android Firefox Browser Java
  • 0
  • Mark post as helpful
  • send pies
  • Report post to moderator
Ankit Garg is right and in println you are calling method without creating the object of Hobbit class.
 
Ulf Dittmer
Rancher
Pie
Posts: 42966
73
  • 1
  • Mark post as helpful
  • send pies
  • Report post to moderator
continued here

Next time, you can just continue the discussion in the same topic, as it is about the same subject.
 
I agree. Here's the link: http://aspose.com/file-tools
    Bookmark Topic Watch Topic
  • New Topic