Exception in thread "main" java.lang.NullPointerException

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Nepomuk
    Recognized Expert Specialist
    • Aug 2007
    • 3111

    #16
    Originally posted by pradeep84
    Hi...
    i hav encoded these codes..in the program.. but it shows error in the main class of the program
    Code:
     
                    
                     Button save= new Button("Save");
                     Button exit= new Button("Exit");
    
    public static void main(String args[]) 
    {
       [B]Customerdetails cud= new Customerdetails();[/B]}
    Thanks
    regards
    pradeep
    Continue checking, if the Objects you're using have been initialized BEFORE use - otherwise you'll have errors when you try to initialize the Customerdetails object.

    Greetings,
    Nepomuk

    Comment

    • r035198x
      MVP
      • Sep 2006
      • 13225

      #17
      Originally posted by pradeep84
      Hi...
      i hav encoded these codes..in the program.. but it shows error in the main class of the program
      Code:
       
                      
                       Button save= new Button("Save");
                       Button exit= new Button("Exit");
      
      public static void main(String args[]) 
      {
         [b]Customerdetails cud= new Customerdetails();[/b]}
      Thanks
      regards
      pradeep
      Where did you put this code. Put the code that you now have.
      Add =java to the opening code tag when you put your code in code tags

      Comment

      • pradeep84
        New Member
        • Sep 2007
        • 37

        #18
        Thank u for the suggestion u made. i have solved my problem
        Thanks a lot.....

        Regards
        Pradeep

        Comment

        • pradeep84
          New Member
          • Sep 2007
          • 37

          #19
          Thank u for the suggestion u made. i have solved my problem

          Comment

          Working...