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

java problems

 
prashant modak
Greenhorn
Posts: 14
Java Linux Redhat
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

What is wrong with this program?
 
Vishal Hegde
Ranch Hand
Posts: 1077
Java Windows
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
whats the error you are getting?


Click here for Static tutorials
 
prashant modak
Greenhorn
Posts: 14
Java Linux Redhat
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
illegal start of expression
 
Vishal Hegde
Ranch Hand
Posts: 1077
Java Windows
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
prashant modak wrote:illegal start of expression


You are getting this because you have a static method in the main method please read the note i have shared it with you
 
John Jai
Rancher
Posts: 1776
  • 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have indented your code. As you see, there are methods written within a method which is not valid in Java.

 
Astha Sharma
Ranch Hand
Posts: 250
Android Eclipse IDE Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can call a method inside another method, but can't write its body inside another method.
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic