If you use these code multiple times.
try {//try catch block for exception handeling
System.out.printf("Enter Midterm grade for: %s %s ", grad.getFirstname(),...
Type: Posts; User: Purple01
If you use these code multiple times.
try {//try catch block for exception handeling
System.out.printf("Enter Midterm grade for: %s %s ", grad.getFirstname(),...
Does your program also gives out those huge error messages?
Like, error: cannot find symbol method getText()
and then below that is writen what line etc etc.
(I will be back later, need to...
Can you post the error message?
That usually tells everything.
I just adjusted my post. :p
Can you maybe tell us at what line the error is located?
* EDIT *
If the problem is in the line:
String name1;
name1 = nameField.getText();
Thanks for letting me know that. :)
I also noticed that by splitting .. you also need those \\ things before it.
That is a letter I pulled out of an arrayList.
for (int x = 0; x < arrayList_Chrom.size(); x++) {
String Chr = arrayList_Chrom.get(x);
}
I will mind the capital letter next time yes. :)
Chr and chr are the same, I will adjust that in my post.
I have a small problem that I am unsure on how to solve this.
I have a arrayList (arrayList_Chrom) with numbers/letters in it: 1, 2, 3 ...... 22, X, Y, M
Now I have made this for loop:
...
Thanks for that. :)
Then the next question, how do I print a value behind it.
Like:
String Chr = Y;
"\"Purple" + Chr"\"
Does anyone know how to print the "in an output line?
Like I want my output link to be: name = "Purple"
Does anyone how to end a subclass?
I have a subclass with an if else loop.
But now I want when the else loop is activated, it need to end that subclass.
I solved it.
I used the subclass whitout the extends.
So public static void calculate() {
And then I would let the program run that subclass when het needs to calculate something.
And it...
The thing is I have a file that I read line by line (in the class readResearchfile)
But I have to make the same calulation over and over again for certain parts, and in diffrent loops.
So I was...
I have made this subclass:
public static void cacluate() extends readResearchfile {
//
}
But it gives me this error: Syntax error on token "extends", throws expected
I asume you have an program where you write the code with, like eclipse.
If you run the code and it works without errors it will be good for every computer with that system. (like if you use...
Show us your code, and ask questions about it.
Then we can help you solving your question.
Now it looks like you want us to do your homework....
And that is not where this forum is for.
On...
What is your question you need help with?
I have a problem with my code but I realy don't know why it doesn't work...
I have a string, named: chr1 (size = 4)
chr = chr.1
String str = chr;
if (chr.equals("chr1")) {...
I found the solution.
Thanks for the help you gave. :)
I have a arrayList with multiple entries.
And I would like to grab the first entry and the look in a file and grab a certain line.
After that I would like to grab the second entry from the...
So your desired output would be OLLEH?
If don't know if this helps, but you can also take letters separate out of it.
That might be another way of solving it. (There are multiple ways to Rome...
I think you maybe can use 'contains' to look for the lines that have a "account" in the line.
And after that you can use the split() functiion to grab the word you need.
Good luck.
You counld start on how to input the number into your program.
Try googling the Scanner function.
That one might help. :)
If you have a panel/frame with a JButton on it.
And when it is clicked it will close the whole program.
To do this as said by other poster you need to use the System.exit(0);
It will idd close...