It's not a secret anymore!
The moose likes Java in General and the fly likes netbeans 7.1 errors Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "netbeans 7.1 errors" Watch "netbeans 7.1 errors" New topic
Author

netbeans 7.1 errors

Adrian Jakubas
Greenhorn

Joined: Aug 17, 2011
Posts: 3
I'm new to programming so any help would be appreciated

it says "illegal start of expression, identifier expected"
now I don't know if it is anactual Nerbeans problem or not buy here's my code:


Stephan van Hulst
Bartender

Joined: Sep 20, 2010
Posts: 3989
    
  18

Hi Adrian, welcome to CodeRanch.

Your code starts with public static void main(String[] args) {

I don't think you intended that.


The mind is a strange and wonderful thing. I'm not sure that it will ever be able to figure itself out, everything else, maybe. From the atom to the universe, everything, except itself.
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 43995
    
  33
Welcome to the Ranch

"Illegal start ..." errors usually mean you have too many { or too few }.

If you are using an IDE like NetBeans, doesn't it insert whole pairs of {}? In which case you can put your mouse inside the pair {*} and put the contents of the method there.
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 43995
    
  33
Adding code tags shows your code to be very badly indented, and, as Stephan has told you, the method heading before the import declarations. If you move that to inside the class, you can probably persuade NetBeans to format and indent your code correctly, and you can try again.
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 43995
    
  33
Did you copy the code by hand? There are other errors, eg JTectField instead of JTextField.
Adrian Jakubas
Greenhorn

Joined: Aug 17, 2011
Posts: 3
Adrian Jakubas wrote:I'm new to programming so any help would be appreciated

it says "illegal start of expression, identifier expected"
now I don't know if it is anactual Nerbeans problem or not buy here's my code:


Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 43995
    
  33
. . . and??
We have already made useful suggestions.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: netbeans 7.1 errors
 
It's not a secret anymore!