wood burning stoves 2.0*
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


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
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: 3605
    
  14

Hi Adrian, welcome to CodeRanch.

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

I don't think you intended that.
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 38087
    
  22
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: 38087
    
  22
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: 38087
    
  22
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: 38087
    
  22
. . . and??
We have already made useful suggestions.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: netbeans 7.1 errors
 
Similar Threads
Problem with ActionListener and JButtons (harder than it first seems
Can't Update Record ?
JOptionPane on focusLost
Can't Update Record ?
Implementing scanner into a simple login page