User Profile

Collapse

Profile Sidebar

Collapse
JPane
JPane
Last Activity: Feb 26 '08, 10:01 PM
Joined: Feb 15 '08
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • JPane
    replied to int cannot be dereferenced error message
    in Java
    Code:
          package studentobject;
    
          import java.io.*;
    
          import javax.swing.JOptionPane;
     
    
          class Number {
     
             String studentName;
    
    
             int[] Number;
    
    
          public Number () {
     
             studentName = JOptionPane.showInputDialog("Please Enter student name");
    ...
    See more | Go to post

    Leave a comment:


  • JPane
    replied to int cannot be dereferenced error message
    in Java
    If I have two classes which are number and student how would I call them up in the main method when I just instantiate a number object. Meaning the input attributes in the student class.

    Both classes are composition of each other....
    See more | Go to post

    Leave a comment:


  • JPane
    replied to int cannot be dereferenced error message
    in Java
    Thanks for the help.
    See more | Go to post

    Leave a comment:


  • JPane
    replied to int cannot be dereferenced error message
    in Java
    maybe int [] grade is better.


    Still doesn't work since the error is coming with this line

    for (int i = 0; i < numNumber; i++)...
    See more | Go to post

    Leave a comment:


  • JPane
    replied to int cannot be dereferenced error message
    in Java
    Yeah, I meant for (int i = 0; i < numNumber; i++); forget the int there.

    in the attributes list I wanted to make an array of number objects then in the constructor I would prompt the user for the number of number objects and use a for loop to instantiate each number account using the number constructor for each.

    in the main method I would just instantiate two number objects.

    The problem I'm having is...
    See more | Go to post

    Leave a comment:


  • JPane
    started a topic int cannot be dereferenced error message
    in Java

    int cannot be dereferenced error message

    [CODE=Java]package bankobject;
    import java.io.*;
    import javax.swing.JOp tionPane;

    class Number {
    String studentName;
    String teacherName;
    int[] Number;

    public Number () {
    studentName = JOptionPane.sho wInputDialog("P lease Enter student name");
    teacherName = JOptionPane.sho wInputDialog("P lease Enter the teacher name ");
    int numNumber...
    See more | Go to post
    Last edited by BigDaddyLH; Feb 15 '08, 04:46 AM. Reason: Added Java to code tag
No activity results to display
Show More
Working...