Jump to content

main class ceating problem....

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
1 reply to this topic

#1
anuj6928

anuj6928

    Newbie

  • Members
  • Pip
  • 1 posts
hey acctually i m creating desktop application ... so in the page where i m try to enter data in database ... there is a scen created ,...
that is in the main class

public static void main (String args[]) {
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new registration().setVisible(true);
}
});
}


and got an error of... illegal start of expression....
kindly help me as soon as possible...

#2
wim DC

wim DC

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 2,084 posts
There is nothign wrong with that piece of code.
Few things to notice:
  • It's more common to do "String[] args"
  • class names must begin with a capital letter, so you should name yours "Registration"

But these things don't cause any errors. Your error lies somewhere else.