MonicaClare 0 Light Poster

hello to all..
i have a problem in my Video card..

i don't have any driver for my Video card..

can anyone help me ?
give me url or anysite to download,,

NVIDIA RIVA TNT2 Model 64/Model 64 Pro
AGP ..32mb..

..

thanks..

MonicaClare 0 Light Poster

.. can you suggest or show me some code that suit for my program?

hhmm.. just asking for your consideration ..

im really sorry ..

MonicaClare 0 Light Poster

it doesn't look like your code is written to do too much...

it runs fine, but fine depends on what you want it to do. if you are referring to the alphabetical ordering of characters, well it isn't happening because all you are doing is print the characters of the username in chronological order.

does that help?

i want it to be like the said output ..
how will i do it?

please help me..

MonicaClare 0 Light Poster

what exactly is the problem? it is a little unclear to me...

uuhhmm..

the main problem of this program is..

i can't use the middle part of the code ,,

there is something wrong ..

it cannot run when i use the middle part of my program ..

hhmm.. sorry for my unclear explanation ..

please help me.. for this.. thanks alot..

MonicaClare 0 Light Poster

i have a problem for this program .
how can i use the program in the middle..
i tried to put it IN .. but many error exist..

please help me with my program .. thanks..

here's the output:
Enter Name: Simplicio
Enter Password: pOLOtAn
1 Capital constant letter/s
4 lower case consonant letter/s
0 capital Vowel letter/s
4lower case Vowel letter/s
Try Again?

import java.io.*;
import java.awt.Graphics;
import java.util.Random;
import javax.swing.*;
import java.util.Scanner;

public class midquiz
{
public static void main (String [] args) throws IOException
{
//try
{
Scanner input = new Scanner(System.in);

String name,pass,ans;
String pass1="pOLOtAn";
int len;
char len1[];
len1 = new char[20];


do
{

System.out.println ("Username must be 8 to 15 character only.");
System.out.print("Enter Username:");
name = input.nextLine();
len = name.length();

if (len>= 8 && len<=15)
{
for (int b=0;b<1;b++)
{
System.out.print("Enter Password:");
pass=input.nextLine();
if(pass.equals(pass1))
{
System.out.print("Alphabetical Order of your name is:");
for (int c=0;c<len;c++)
{
len1[c]=name.charAt(c);
}

//for(int d=1;d<len;d++)
//{
// if (let[c]>let[d])
// {
// char temp=let[c];
// let[c]=let[d];
// let[d]= temp;
// }
// }

for (int c=0;c<len;c++)
{
System.out.println(len1[c]+"");
}
}
else
{
System.out.println("You Have Enter Wrong PassWord ");
System.exit(0);
}


}


}
else
{
System.out.println("ILLEGAL USER! GOODBYE....");
System.exit (0);
}


System.out.println("\n Try Again? [Yes/No]:");
ans=input.nextLine();

}while (ans.equalsIgnoreCase ("Yes"));

}

} 
}
MonicaClare 0 Light Poster

Without seeing changes you made to your original code we cannot advice. So please post your code and we will try our best to advice you...

import java.util.Scanner;
import java.io.*;





public class Meows
{
	static String authentication="pOLOtAn";
	static String choice="no";
	public static void main(String[] str)
	{
		String password=null;
		int len = str.length(), d, let;
		do
		{
			Scanner sc=new Scanner(System.in);
			System.out.println("Enter Your name");
			String name=sc.nextLine();
			System.out.println("**********"+name+"************");
			
			if(name.length()>=8 && name.length()<=15)
			{
				System.out.println("Enter Password");
				password=sc.nextLine();
				System.out.println("**********"+password+"************");
				
				if(!authentication.equalsIgnoreCase(password))
				{
					for(int i=0;i<2;i++)
					{
						System.out.println("The entered password is incorrect. Please try again");
						password=sc.nextLine();
						if(authentication.equalsIgnoreCase(password))
						{
							break;
						}
						if(i==1)
						{
							System.out.println("You have enetered wrong password 3 times. Bye!!!");
							System.exit(1);
						}
					}
				}
				
				else
				{
				 {System.out.print ("Alphabetical Order of your name is:");
				 for (int c=0;c<len;c++);
				 
				  
      {
 len ([c]=name.charAt (c)); // ")" expected, illegal start of expression
      }
 for(int c=0;c<len;c++);
      {
 if (let[c]>let [d]);
      {
 char temp=let [c];
 let[c]=let[d];
 let[d]= temp;
      }
    }
  }
 for (int c=0;c<len;c++);
      {
 System.out.print (let [c]+"");
      }
      }
			}
 		else
			{
			
				System.out.println("User name must be 8 to 15 characters");
				System.out.println("Press Enter to continue or NO to exit");
				choice=sc.nextLine();
			}
			
			
		}
		while(!"no".equalsIgnoreCase(choice));
		
	}
	
}

here ..

MonicaClare 0 Light Poster

i don't get it T_T ...

i try to change .. and put my logic in your code ..

but it full of error T_T

please ... help me.. i need it now T_T ...

MonicaClare 0 Light Poster

i change it now..
but still error exist:

import java.io.*;
import java.awt.Graphics;
import java.util.Random;
import javax.swing.*;

public class Meow
{
private static BufferedReader stdin =  new BufferedReader( new InputStreamReader( System.in ));
public static void main (String [] args) throws IOExeption
{

 String name,pass,ans; String pass1="pOLOtAn"; int len;

do{
 for (inta=0;a<=0;a--)
      {
 s.o.p ("Enter Username:");
 name = IN.readLine();
 len = name.length();
 if (len>= 8 && len<=15)
      {
 for (int b=0;b<3;b++)
      {
 s.o.p ("Enter Password:");
 pass=IN.readLine();
 if(pass.equals(pass1))
      {s.o.p ("Alphabetical Order of your name is:");
 for (int c=0;c<len;c++)
      {
 len [c]=name.charAt (c);
      }
 for(int c=0;c<len;c++)
      {
 if (let[c]>let [d])
      {
 char temp=let [c];
 let[c]=let[d];
 let[d]= temp;
      }
    }
  }
 for (int c=0;c<len;c++)
      {
 s.o.p (let [c]+"");
      }
      }
 if (b==2)
      {
 s.o.pIn ("ILLEGAL USER! GOODBYE....");
 System.exit (0);
      }
 else
      {
 s.o.pIn ("INVALID PASSWORD!");
      }
     }
 break;
      }
 s.o.pIn ("Username must be 8 to 15 character only.");
      }
while
 s.o.p ("\n Try Again? [Yes/No]:"); // "(" expected , illegal start of expression

 ans=IN.readLine();
while (ans.equals Ignore Case ("Yes")); // ")" expected
}  
} 	
} // "class" or "interface" expected, class or "interface" expected

please help me .. its making me dizzy T_T

help me.. thanks ...

MonicaClare 0 Light Poster

hi to all programmer...
i have a problem about this program ..
an error exist ..

import java.io.*;
import java.awt.Graphics;
import java.util.Random;
import javax.swing.*;

public class midquiz 2{ // "{" expected
public static void main (String [] args) throws IOExeption{
BufferedReader 9new InputStreamreader (System.in));
 String name,pass,ans; String pass1="pOLOtAn"; int len;

do{
 for (inta=0;a<=0;a--)
      {
 s.o.p ("Enter Username:");
 name = IN.readLine();
 len = name.length();
 if (len>= 8 && len<=15)
      {
 for (int b=0;b<3;b++)
      {
 s.o.p ("Enter Password:");
 pass=IN.readLine();
 if(pass.equals(pass1))
      {s.o.p ("Alphabetical Order of your name is:");
 for (int c=0;c<len;c++)
      {
 len [c]=name.charAt (c);
      }
 for(int c=0;c<len;c++)
      {
 if (let[c]>let [d])
      {
 char temp=let [c];
 let[c]=let[d];
 let[d]= temp;
      }
    }
  }
 for (int c=0;c<len;c++)
      {
 s.o.p (let [c]+"");
      }
      }
 if (b==2)
      {
 s.o.pIn ("ILLEGAL USER! GOODBYE....");
 System.exit (0);
      }
 else
      {
 s.o.pIn ("INVALID PASSWORD!");
      }
     }
 break;
      }
 s.o.pIn ("Username must be 8 to 15 character only.");
      }
 s.o.p ("\n Try Again? [Yes/No]:";
 ans=IN.readLine();
      } while (ans.equals Ignore Case ("Yes"));
      }}

the output i want to be is this:

// Enter Name: Simplicio
1 Capital constant letter/s
4 lower case consonant letter/s
0 capital Vowel letter/s
4 lower case Vowel letter/s
Try Again? //

please help me.. thanks

MonicaClare 0 Light Poster

hello..
uuhhmm ... i have a problem here..
i want to know how can i do that
if the tuition paid "yes/no": "N" .. then message_error exist that "you need to pay first.." ,. and dont print the result,,
but if the answer is "Y" then .. it proceed to result..
its a running program .. please debug it..
please help me..
need it ASAP .. thanks..

/**panchitz trial program.. still error**/

import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.text.*;

public class Panchita extends JPanel  implements ActionListener,
                                                  FocusListener {
                                                  	
    JTextField studentField, addressField, paidField;
    JFormattedTextField stu_idField;
    JSpinner courseSpinner;
    boolean addressSet = false;
    Font regularFont, italicFont;
    JLabel addressDisplay;
    final static int GAP = 10;

   
 //  do {  // loop sa do while (still error)
   
   
   
    public Panchita() {
        setLayout(new BoxLayout(this, BoxLayout.LINE_AXIS));

        JPanel leftHalf = new JPanel() {
            public Dimension getMaximumSize() {
                Dimension pref = getPreferredSize();
                return new Dimension(Integer.MAX_VALUE,
                                     pref.height);
            }
        };
        leftHalf.setLayout(new BoxLayout(leftHalf,
                                         BoxLayout.PAGE_AXIS));
        leftHalf.add(createEntryFields());
        leftHalf.add(createButtons());

        add(leftHalf);
        add(createAddressDisplay());
    }

    protected JComponent createButtons() {
        JPanel panel = new JPanel(new FlowLayout(FlowLayout.TRAILING));

        JButton button = new JButton("Print");
        button.addActionListener(this);
        panel.add(button);

        button = new JButton("Clear");
        button.addActionListener(this);
        button.setActionCommand("clear");
        panel.add(button);

      
        panel.setBorder(BorderFactory.createEmptyBorder(0, 0,
                                                GAP-5, GAP-5));
        return panel;
    }

   
    public void actionPerformed(ActionEvent e) {
        if ("clear".equals(e.getActionCommand())) {
            addressSet = false;
            studentField.setText("");
            addressField.setText("");
            
            paidField.setText("");  //paid

            //set ng text
            stu_idField.setValue(null);
        } else {
            addressSet = true;
        }
        updateDisplays();
    }

    protected void updateDisplays() {
        addressDisplay.setText(formatAddress());
        if (addressSet) {
            addressDisplay.setFont(regularFont);
        } else {
            addressDisplay.setFont(italicFont);
        }
    }

    protected JComponent createAddressDisplay() {
        JPanel panel = new JPanel(new BorderLayout());
        addressDisplay = …
MonicaClare 0 Light Poster

hi..
this is my new program ..
i want a fix or constant answer like,
when the answer in:
Student Name: Monica Clare
then it proceed to another question..
but when..
Student Name: blah blah
then. it shown error_message that it is invalid answer,, ..

please help me debugging this .. thanks ^_^

import javax.swing.*;
import java.util.*;
import java.awt.Graphics;
import java.util.Random;
import java.io.*;   
import java.util.regex.Pattern;
import java.util.regex.Matcher;


public class Final

{
   
	public static void main(String args[])
		 
	{
		String name,student,courses,answer,result,e,f,s="";
		

do{

		Scanner Console = new Scanner(System.in);
		name=JOptionPane.showInputDialog("Student Name:");
		student=JOptionPane.showInputDialog("Student I.D.:");
		courses=JOptionPane.showInputDialog("No. of courses enrolled:");
		e=JOptionPane.showInputDialog("Total No. of credit hours:");
	    f=JOptionPane.showInputDialog("Remaining Bills upon Enrollment:");
	   
	      
    	
		result="\n\tStudent Name: "+name+"\n\tStudent I.D.: "+student+"\n\tNo. of courses enrolled: "+courses+"\n\tTotal No. of credit hours: "+e+".";
	    answer = JOptionPane.showInputDialog("Is tuition paid? [Y/N]:");
 
	  

	   
	   
	   
	   
		if (answer.charAt(0) == 'Y' || answer.charAt(0) == 'y');
			
	    else
	  
	    JOptionPane.showMessageDialog(null,"Paid your Remaining Bill","Warning",
	    JOptionPane.ERROR_MESSAGE);	
		
			
		}while (answer.charAt(0)=='N' || answer.charAt(0)=='n');
		
		JOptionPane.showMessageDialog(null,result,"Result",
	    JOptionPane.PLAIN_MESSAGE);

		
	   JOptionPane.showMessageDialog(null, "Done", "Done", JOptionPane.INFORMATION_MESSAGE);
	    
	}
}
MonicaClare 0 Light Poster

when i put the code

boolean LegalName (String userInput);

the ";" expected error is existed.. then i put ";"

boolean LegalName (String userInput);

but same thing.. error exist... what wrong with it?

MonicaClare 0 Light Poster

thanks .. its a big help for me..
uuhhmm.. how can i do to the fix answer?

like when if i answer
student name: monica clare

then it proceed to other question..
but when i answer it ..
student Name: blah blah blah or etch..

JOptionPane.showMessageDialog(null,"Invalid Input","Warning", JOptionPane.ERROR_MESSAGE);

..

thanks ..

MonicaClare 0 Light Poster

What exactly is this program supposed to do? What's the goal?

my goal? uhhmm

here the output result i want to do (but ..it make confuse and dizzy for me): .. if the answers of "try again?" is "y" then see the result.. else or "n" .. then closed the showdialogbox..

total no. of credits hour: 20hours
Student Name: Monica Clare Licaros
Student ID: 08003444200
No. of Courses enrolled: 2

hhmm.. thanks advance for helping me.. :D

MonicaClare 0 Light Poster

here.. i tried to put a stringbuffer ... it's running ..
but i thinks there is wrong with this program,,
please check .. thanks..

import java.awt.Graphics;
import java.util.Random;
import javax.swing.*;
import java.io.*;   
      
     
       	
      public class mmm {
      public static void main (String[]args) {
      String m1, m2, m3, m4, m5, m6, m7, m8, asa, m0, naman, temp="";
      String student, courses, answer, result="";
     
      StringBuffer name = new StringBuffer("");
      name.append(",");
    
      String nameStr1 = name.toString();
      String nameStr2 = new String(name);
      
      int x, a;
  
      Foo foo = new Foo();
      foo.main(null);
  
      }
     
    
      static class Foo{
      public static void main (String[]args){
      String m1, m2, m3, m4, m5, m6, m7, m8, asa, m0, naman, temp="";
      String student,courses,answer,result="";
  
  	  StringBuffer name = new StringBuffer("");
      name.append("");
    
      String nameStr1 = name.toString();
      String nameStr2 = new String(name);
      
  
      int x, a, m13;
  
      String[] m9= new String[10];
      String[] m10= new String[10];
      int[] m11= new int[10];
      int[] m12= new int[10];
  
      
      	
    do{
     
      m1 = JOptionPane.showInputDialog("name:" + name);
      m2 = JOptionPane.showInputDialog("Student ID:" + name);
      m3 = JOptionPane.showInputDialog("Tuition Fee:" + name);
      m0 = JOptionPane.showInputDialog("Numbers of Student Enrolled:" + name);
      a = Integer.parseInt(m0);
  	  
     
      for(x=0; x<a; x++)
  
      {
  
      m5 = JOptionPane.showInputDialog("Course Code:" + name);
      m6 = JOptionPane.showInputDialog("Course Name:" + name);
      m7 = JOptionPane.showInputDialog("Credit Hours:" + name);
      m8 = JOptionPane.showInputDialog("Course GRADE:" + name);
      m13 = Integer.parseInt(m7);
     
     
      }
      	JOptionPane.showMessageDialog(null, "Done", "", JOptionPane.INFORMATION_MESSAGE); 
      
      
      asa = JOptionPane.showInputDialog("try again? [Y/N] ...");
      
      }while (asa.charAt(0)=='Y'|| asa.charAt(0)=='y');
  
  
  	
      }
 
          }
 
        }
MonicaClare 0 Light Poster

hi.. uuhhmm..
i have a problem in how to put an String Buffer method here in my code.. uuhhmm.. i just want to know the easiest way of putting a String buffer .. please help . . thanks..

import java.awt.Graphics;
import java.util.Random;
import javax.swing.*;
        
      public class Change {
      public static void main (String[]args) {
      String m1, m2, m3, m4, m5, m6, m7, m8, asa, m0, naman, temp="";
  
      int x, a;
  
      Foo foo = new Foo();
      foo.main(null);
  
      }
     
      static class Foo{
      public static void main (String[]args){
      String m1, m2, m3, m4, m5, m6, m7, m8, asa, m0, naman, temp="";
  
      int x, a, m13;
  
      String[] m9= new String[10];
      String[] m10= new String[10];
      int[] m11= new int[10];
      int[] m12= new int[10];
  
    do{
  
      m1 = JOptionPane.showInputDialog("Student Name:");
      m2 = JOptionPane.showInputDialog("Student ID:");
      m3 = JOptionPane.showInputDialog("Tuition Fee:");
      m0 = JOptionPane.showInputDialog("Numbers of Student Enrolled:");
      a = Integer.parseInt(m0);
  
      for(x=0; x<a; x++)
  
      {
  
      m5 = JOptionPane.showInputDialog("Course Code:");
      m6 = JOptionPane.showInputDialog("Course Name:");
      m7 = JOptionPane.showInputDialog("Credit Hours:");
      m8 = JOptionPane.showInputDialog("Course GRADE:");
      m13 = Integer.parseInt(m7);
  
      }
      JOptionPane.showMessageDialog(null,temp,"TITLE",JOptionPane.PLAIN_MESSAGE);
      asa = JOptionPane.showInputDialog("try again? [Y/N] ...");
  
      }while (asa.charAt(0)=='Y'|| asa.charAt(0)=='y');
  
  
      do{
  
    m1 = JOptionPane.showInputDialog("Student Name:");
    m2 = JOptionPane.showInputDialog("Student ID:");
    m3 = JOptionPane.showInputDialog("Tuition Fee:");
    m0 = JOptionPane.showInputDialog("Numbers of Student Enrolled:");
  
      a = Integer.parseInt(m0);
  
      for(x=0; x<a; x++)
  
      {
  
      m5 = JOptionPane.showInputDialog("Course Code:");
      m6 = JOptionPane.showInputDialog("Course Name:");
      m7 = JOptionPane.showInputDialog("Credit Hours:");
      m8 = JOptionPane.showInputDialog("Course GRADE:");
  
      } 
     JOptionPane.showMessageDialog(null,temp,"TITLE",JOptionPane.PLAIN_MESSAGE);
      asa = JOptionPane.showInputDialog("try again? [Y/N] ...");
      }while (asa.charAt(0)=='Y'|| asa.charAt(0)=='y');
  
      
          }
 
        }

      }
MonicaClare 0 Light Poster

.. thanks .. ^^
uuhhmm .. can i put string buffer here? .. if yes.. then how?
teach me.. please..

import java.awt.Graphics;
import java.util.Random;
import javax.swing.*;
   
       
   
      public class Change {
      public static void main (String[]args) {
      String m1, m2, m3, m4, m5, m6, m7, m8, asa, m0, naman, temp="";
  
      int x, a;
  
      Foo foo = new Foo();
      foo.main(null);
  
      }
     
  
      static class Foo{
      public static void main (String[]args){
      String m1, m2, m3, m4, m5, m6, m7, m8, asa, m0, naman, temp="";
  
      int x, a, m13;
  
      String[] m9= new String[10];
      String[] m10= new String[10];
      int[] m11= new int[10];
      int[] m12= new int[10];
  
       
  
    do{
  
      m1 = JOptionPane.showInputDialog("Student Name:");
      m2 = JOptionPane.showInputDialog("Student ID:");
      m3 = JOptionPane.showInputDialog("Tuition Fee:");
      m0 = JOptionPane.showInputDialog("Numbers of Student Enrolled:");
      a = Integer.parseInt(m0);
  
      for(x=0; x<a; x++)
  
      {
  
      m5 = JOptionPane.showInputDialog("Course Code:");
      m6 = JOptionPane.showInputDialog("Course Name:");
      m7 = JOptionPane.showInputDialog("Credit Hours:");
      m8 = JOptionPane.showInputDialog("Course GRADE:");
      m13 = Integer.parseInt(m7);
  
      }
  
      JOptionPane.showMessageDialog(null,temp,"TITLE",JOptionPane.PLAIN_MESSAGE);
      asa = JOptionPane.showInputDialog("try again? [Y/N] ...");
  
      }while (asa.charAt(0)=='Y'|| asa.charAt(0)=='y');
  
  
      do{
  
    m1 = JOptionPane.showInputDialog("Student Name:");
    m2 = JOptionPane.showInputDialog("Student ID:");
    m3 = JOptionPane.showInputDialog("Tuition Fee:");
    m0 = JOptionPane.showInputDialog("Numbers of Student Enrolled:");
  
      a = Integer.parseInt(m0);
  
      for(x=0; x<a; x++)
  
      {
  
      m5 = JOptionPane.showInputDialog("Course Code:");
      m6 = JOptionPane.showInputDialog("Course Name:");
      m7 = JOptionPane.showInputDialog("Credit Hours:");
      m8 = JOptionPane.showInputDialog("Course GRADE:");
  
      }
      
     JOptionPane.showMessageDialog(null,temp,"TITLE",JOptionPane.PLAIN_MESSAGE);
      asa = JOptionPane.showInputDialog("try again? [Y/N] ...");
      }while (asa.charAt(0)=='Y'|| asa.charAt(0)=='y');
  
       
 
          }
 
        }

      }
MonicaClare 0 Light Poster
import java.awt.Graphics;
import java.util.Random;
import javax.swing.*;
   
      public class Change {
      public static void main (String[]args) {
      String m1, m2, m3, m4, m5, m6, m7, m8, asa, m0, naman, temp="";
  
      int x, a;
  
      Foo foo = new Foo();
      foo.main(null);
  
      }
     
  
      static class Foo{
      public static void main (String[]args){
      String m1, m2, m3, m4, m5, m6, m7, m8, asa, m0, naman, temp="";
  
      int x, a, m13;
  
      String[] m9= new String[10];
      String[] m10= new String[10];
      int[] m11= new int[10];
      int[] m12= new int[10];  
  
    do{
  
      m1 = JOptionPane.showInputDialog("Student Name:");
      m2 = JOptionPane.showInputDialog("Student ID:");
      m3 = JOptionPane.showInputDialog("Tuition Fee:");  
  
      m0 = JOptionPane.showInputDialog("Numbers of Student Enrolled:");
      a = Integer.parseInt(m0);
  
      for(x=0; x<a; x++)
  
      {
  
      m5 = JOptionPane.showInputDialog("Course Code:");
      m6 = JOptionPane.showInputDialog("Course Name:");
      m7 = JOptionPane.showInputDialog("Credit Hours:");
      m8 = JOptionPane.showInputDialog("Course GRADE:");
      m13 = Integer.parseInt(m7);
  
      }
  
      JOptionPane.showInputDialog(null, String message, String title, int messageType); //here ")" expected
      asa = JOptionPane.showInputDialog("try again? [Y/N] ...");
  
       
      }while (asa.charAt(0)=='Y'|| asa.charAt(0)=='y');
  
  
      do{
  
    m1 = JOptionPane.showInputDialog("Student Name:");
    m2 = JOptionPane.showInputDialog("Student ID:");
    m3 = JOptionPane.showInputDialog("Tuition Fee:");
  
        m0 = JOptionPane.showInputDialog("Numbers of Student Enrolled:");
  
      a = Integer.parseInt(m0);
  
      for(x=0; x<a; x++)
  
      {
  
      m5 = JOptionPane.showInputDialog("Course Code:");
      m6 = JOptionPane.showInputDialog("Course Name:");
      m7 = JOptionPane.showInputDialog("Credit Hours:");
      m8 = JOptionPane.showInputDialog("Course GRADE:");
  
      }
       
 JOptionPane.showInputDialog(null, String message, String title, int messageType); //here ")" expected
      asa = JOptionPane.showInputDialog("try again? [Y/N] ...");
  
      }while (asa.charAt(0)=='Y'|| asa.charAt(0)=='y');
  
       
          }
 
        }

      }

like that?
the the error still exist.. :(
here:
Exception in thread "main" java.lang.NumberFormatException: For input string: ""
at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
at java.lang.Integer.parseInt(Integer.java:468)
at java.lang.Integer.parseInt(Integer.java:497)
at Change$Foo.main(Change.java:70)
at Change.main(Change.java:14)

..please help..

MonicaClare 0 Light Poster

the program is running .. but in the end ..
the note post .. what's that?
an error? hhmm.. i can't understand .. please help me..

Exception in thread "main" java.lang.NumberFormatException: For input string: ""
at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
at java.lang.Integer.parseInt(Integer.java:468)
at java.lang.Integer.parseInt(Integer.java:497)
at Change$Foo.main(Change.java:41)
at Change.main(Change.java:14)

MonicaClare 0 Light Poster

MonicaClare,
Don't post code again and again.
Compare the code posted at post #12 with your code.

adatapost : thanks for helping me.. ^^

MonicaClare 0 Light Poster

copied. where's the error? hhmm i can't understand .. please explain?

MonicaClare 0 Light Poster

MonicaClare,
Did you find any solution?

nope..:( .. please help me in this case?

MonicaClare 0 Light Poster

like that? .. the error exist now in other part of code.. :( ..
please teach me.. how to end it up..

import java.awt.Graphics;
import java.util.Random;
import javax.swing.*;
public class Change {
	
public static void main (String[]args){
  
  
String m1, m2, m3, m4, m5, m6, m7, m8, asa, m0, naman, temp="";
int x, a;
Foo foo = new Foo();
foo.doSomething();
}
static class foo{
	
public static void main (String[]args){

String m1, m2, m3, m4, m5, m6, m7, m8, asa, m0, naman, temp="";
int x, a, m13;
String[] m9= new String[10];
String[] m10= new String[10];
int[] m11= new int[10];
int[] m12= new int[10];

	do{ 
	 m1 = JOptionPane.showInputDialog("Student Name:");
	 m2 = JOptionPane.showInputDialog("Student ID:");
	 m3 = JOptionPane.showInputDialog("Tuition Fee:");
	 
	 m0 = JOptionPane.showInputDialog("Numbers of Student Enrolled:");
	 a  = Integer.parseInt(m0);
	 {
	 	for(x=0; x<a; x++)
	 
	 m5 = JOptionPane.showInputDialog("Course Code:");
	 m6 = JOptionPane.showInputDialog("Course Name:");
	 m7 = JOptionPane.showInputDialog("Credit Hours:");
	 m8 = JOptionPane.showInputDialog("Course GRADE:");
	 m13 = Integer.parseInt(m7);
	 
	 }
	 

	 	
			    JOptionPane.showMessageDialog(null,temp,"TITLE",JOptionPane.PLAIN_MESSAGE);
			
		    	asa = JOptionPane.showInputDialog("try again? [Y/N] ...");
				}while (asa.charAt(0)=='Y'|| asa.charAt(0)=='y');	
		}
		
	}
	 
	
	 	 
int[] m11= new int[15];
int[] m12= new int[15];

	do{ //here illegal start of type
	 m1 = JOptionPane.showInputDialog("Student Name:");
	 m2 = JOptionPane.showInputDialog("Student ID:");
	 m3 = JOptionPane.showInputDialog("Tuition Fee:");
	 
	 m0 = JOptionPane.showInputDialog("Numbers of Student Enrolled:");
	 a  = Integer.parseInt(m0);
	 {
	 	for(x=0; x<a; x++)
	 
	 m5 = JOptionPane.showInputDialog("Course Code:");
	 m6 = JOptionPane.showInputDialog("Course Name:");
	 m7 = JOptionPane.showInputDialog("Credit Hours:");
	 m8 = JOptionPane.showInputDialog("Course GRADE:");
	 
	 
	 }
	 
	
			    JOptionPane.showMessageDialog(null,temp,"TITLE",JOptionPane.PLAIN_MESSAGE);
			
		    	asa = JOptionPane.showInputDialog("try again? [Y/N] ...");
		}while (asa.charAt(0)=='Y'|| asa.charAt(0)=='y'); // here (identifier) expected	
		}
		
	} //here 'class or interface' expected
MonicaClare 0 Light Poster

you don't want to declare class foo inside your main method. close the method before coding the foo class

import java.awt.Graphics;
import java.util.Random;
import javax.swing.*;
public class Change {
	
public static void main (String[]args){
  
  
String m1, m2, m3, m4, m5, m6, m7, m8, asa, m0, naman, temp="";
int x, a;
Foo foo = new Foo();
foo.doSomething();
static class foo{
	
public static void main (String[]args){

like that? hhmm.. then what is next? sorry if i have many question to you. hmm

MonicaClare 0 Light Poster

sorry ..
hhhmm.. error's appear again.. hhmm
help me. :(

import java.awt.Graphics;
import java.util.Random;
import javax.swing.*;
public class Change {
	
public static void main (String[]args){
  
  
String m1, m2, m3, m4, m5, m6, m7, m8, asa, m0, naman, temp="";
int x, a;
String[] m9= new String[15];
String[] m10= new String[15];
Foo foo = new Foo();
foo.doSomething();
static class foo{ // (here) illegal start of exp. and ';' expected.
	
public static void main (String[]args){

String m1, m2, m3, m4, m5, m6, m7, m8, asa, m0, naman, temp="";
int x, a, m13;
String[] m9= new String[10];
String[] m10= new String[10];
int[] m11= new int[10];
int[] m12= new int[10];

	do{
	 m1 = JOptionPane.showInputDialog("Student Name:");
	 m2 = JOptionPane.showInputDialog("Student ID:");
	 m3 = JOptionPane.showInputDialog("Tuition Fee:");
	 
	 m0 = JOptionPane.showInputDialog("Numbers of Student Enrolled:");
	 a  = Integer.parseInt(m0);
	 {
	 	for(x=0; x<a; x++)
	 
	 m5 = JOptionPane.showInputDialog("Course Code:");
	 m6 = JOptionPane.showInputDialog("Course Name:");
	 m7 = JOptionPane.showInputDialog("Credit Hours:");
	 m8 = JOptionPane.showInputDialog("Course GRADE:");
	 m13 = Integer.parseInt(m7);
	 
	 }
	 

	 	
			    JOptionPane.showMessageDialog(null,temp,"TITLE",JOptionPane.PLAIN_MESSAGE);
			
		    	asa = JOptionPane.showInputDialog("try again? [Y/N] ...");
				}while (asa.charAt(0)=='Y'|| asa.charAt(0)=='y');	
		}
		
	}
	 
	
	 	 
int[] m11= new int[15];
int[] m12= new int[15];

	do{
	 m1 = JOptionPane.showInputDialog("Student Name:");
	 m2 = JOptionPane.showInputDialog("Student ID:");
	 m3 = JOptionPane.showInputDialog("Tuition Fee:");
	 
	 m0 = JOptionPane.showInputDialog("Numbers of Student Enrolled:");
	 a  = Integer.parseInt(m0);
	 {
	 	for(x=0; x<a; x++)
	 
	 m5 = JOptionPane.showInputDialog("Course Code:");
	 m6 = JOptionPane.showInputDialog("Course Name:");
	 m7 = JOptionPane.showInputDialog("Credit Hours:");
	 m8 = JOptionPane.showInputDialog("Course GRADE:");
	 
	 
	 }
	 
	
			    JOptionPane.showMessageDialog(null,temp,"TITLE",JOptionPane.PLAIN_MESSAGE);
			
		    	asa = JOptionPane.showInputDialog("try again? [Y/N] ...");
				}while (asa.charAt(0)=='Y'|| asa.charAt(0)=='y');	
		}
		
	}
MonicaClare 0 Light Poster

to: llemes4011

thanks for the feed back.. and it is a big help for me.. thanks again..
uhm.. the error exist again.. :( what i can do? this is the all program .. I'm dizzy in this code :( .. please help me again.. :)

import java.awt.Graphics;
import java.util.Random;
import javax.swing.*;
public class Change {

public static void main (String[]args)

{

String m1, m2, m3, m4, m5, m6, m7, m8, asa, m0, naman, temp="";
int x, a;
String[] m9= new String[15];
String[] m10= new String[15];
public class foo{[B][I] // (here) illegal start of exp. and ';' expected[/I][/B]

public static void main (String[]args)

{

String m1, m2, m3, m4, m5, m6, m7, m8, asa, m0, naman, temp="";
int x, a, m13;
String[] m9= new String[10];
String[] m10= new String[10];
int[] m11= new int[10];
int[] m12= new int[10];

    do{
     m1 = JOptionPane.showInputDialog("Student Name:");
     m2 = JOptionPane.showInputDialog("Student ID:");
     m3 = JOptionPane.showInputDialog("Tuition Fee:");

     m0 = JOptionPane.showInputDialog("Numbers of Student Enrolled:");
     a  = Integer.parseInt(m0);
     {
        for(x=0; x<a; x++)

     m5 = JOptionPane.showInputDialog("Course Code:");
     m6 = JOptionPane.showInputDialog("Course Name:");
     m7 = JOptionPane.showInputDialog("Credit Hours:");
     m8 = JOptionPane.showInputDialog("Course GRADE:");
     m13 = Integer.parseInt(m7);

     }




























                JOptionPane.showMessageDialog(null,temp,"TITLE",JOptionPane.PLAIN_MESSAGE);

                asa = JOptionPane.showInputDialog("try again? [Y/N] ...");
                }while (asa.charAt(0)=='Y'|| asa.charAt(0)=='y');   
        }

    }



int[] m11= new int[15];
int[] m12= new int[15];

    do{
     m1 = JOptionPane.showInputDialog("Student Name:");
     m2 = JOptionPane.showInputDialog("Student ID:");
     m3 = JOptionPane.showInputDialog("Tuition Fee:");

     m0 = JOptionPane.showInputDialog("Numbers of Student Enrolled:");
     a  = Integer.parseInt(m0);
     {
        for(x=0; x<a; x++)

     m5 = JOptionPane.showInputDialog("Course Code:");
     m6 = JOptionPane.showInputDialog("Course Name:");
     m7 = JOptionPane.showInputDialog("Credit Hours:");
     m8 = JOptionPane.showInputDialog("Course GRADE:");


     }




























                JOptionPane.showMessageDialog(null,temp,"TITLE",JOptionPane.PLAIN_MESSAGE);

                asa = …
MonicaClare 0 Light Poster

Hi to all programmers..
i have a problem about this code .. i don't know what to do to this code.. i change a lot of code .. but always appear the error "illegal start of expression" .. I'm a newbie in Java.. please help me in this case.. thanks..

import javax.swing.*;
public class Change {

public static void main (String[]args)

{

String m1, m2, m3, m4, m5, m6, m7, m8, asa, m0, naman, temp="";
int x, a;
String[] m9= new String[15];
String[] m10= new String[15];import javax.swing.*; // (here) illegal start of exp.
public class Change { // (here) illegal start of exp. with ';' expected