What function? Subtraction?
Type: Posts; User: Junky
What function? Subtraction?
When you add 5 to 10 you get 15 which is greater than 12 and your loop exits. You will need to rethink your design. Maybe a while loop would be better. To wrap your values back around to 0 you can...
Be careful. Just sticking static in everywhere is not a good solution and goes against OO principals.
Let's not. A better solution is to create a Person object to encapsulate the data but I guess this is a stupid assignment to teach 2D arrays.
That's why I'm confused. What exactly is the OP doing?
A lot of the time when people say "... doesn't show on my gui" it's a painting issue. Have you called repaint?
Long month!
:confused:
If the String is coming from another system then internal quotes should not be a problem.
A Calendar object will represent the exact point in time it was created. You can then call its methods to find the day and month. Then compare them to you birthdate month and day. Go to the API and...
You can use the Calendar class to check if today's month/day is before or after the month/day of the birthdate and adjust accordingly.
Copy and paste the exact error messages as well.
You could use a JFileChooser and allow user to locate the file.
Try working out how to do this using your native currency first. Once you have that working then convert it to G S K!
(Shekel for an ex-leper?)
Google!
Even if this was possible what would stop A logging on and then handing computer over to B to do homework for them? As Cornix said, students will always think of ways to cheat. What gets me is that...
How do you add a new element to the List?
--- Update ---
OK
Just looked at the code and it seems you are maintaining a Sorted List. Normal List implementations have two instance variable,...
String[] key = {"A", "D", "B"};
String[] answers = {"A", "C", "B"};
loop {
if answer equals key element {
inc count
}
}
if use a new key {
get new key
}
Yes it does. If you go back and read and reread things until you understand you will be able to fix your own problems and you learn better that way. Just expecting us to tell you how to fix the code...
Your choice of variable names is confusing: previousElement begins by pointing to the next element.
A quick look at the first loops it seems you are actually reordering the first two elements over...
If you have working code that prints out all lines of the triangle all you need to do is add some sort of control that only prints the desired line. What kind of control statement do you think that...
What should your method return if t is 2, t < 1 or t > 12?
that's what the DecimalFormat object is for. Go to the API and read about the class or search online for tutorials on how to use it.
I see in your code you create a DecimalFormat object. I don't see where you use it!
Simple. Don't hand in your homework, get a F and wait for teacher to hand out answers.
We aren't doing it for you.
Is the objective to reverse the array or just display the data in reverse order? If the latter then just use a reverse loop to print out all values.