Updated code.
import java.util.Arrays;
class BirthdaySurprise {
public static void main(String[] args){
// here are all the people
byte TSE = 122;
short LA =...
Type: Posts; User: Melawe
Updated code.
import java.util.Arrays;
class BirthdaySurprise {
public static void main(String[] args){
// here are all the people
byte TSE = 122;
short LA =...
Would you mind posting the code so I can try to use the class?
It's not a problem actually, I was only wondering if I could do int AL = 27/12/93; instead of int AL = 361;
//361 being the 361st day of the year
Did you understand me?
import java.util.Arrays;
class BirthdaySurprise {
public static void main(String[] args){
// here are all the people
byte TSE = 122;
short LA = 184;
short...
I was thinking, my code looks good so far. But it would be much much better if I could make each persons variable equal to their DOB. Is there anyway that would be possible?
A bit confused there.
70 and 123. Is that causing the error? Can't it hold 123 as the first element? It works when I so it this way.
short[] aryLa = {123,124,125,126,127,128,129,130,131,132,133,134,135,136,
...
I'm getting an error message for this loop.
short[] aryLa = new short[70];
for( short aryLaAdder = 123; aryLaAdder <=184;aryLaAdder++){
//This will store each index with...
import java.util.Arrays;
class BirthdaySurprise {
public static void main(String[] args){
// here are all the people
byte TSE = 122;
short LA = 184;
short ZE...
Printed out aryOneAddr=121 over 121 times.
The array is created out of the for loop. Here is the current version of the code.
import java.util.Arrays;
class BirthdaySurprise {
public static void main(String[] args){
// here...
That was the output for the Paster program, which I was using to experiment with. But the Birthday Surprise program still has 0 as the output.
Not reallyx cause the output of the BirthdaySurprise program is still 0.
Note: this is another program I use to experiment something I am not sure will work, if it works I then apply it to the main program.
class Paster {
public static void main(String[] args){...
All elements of aryOne are equal to 0.
import java.util.Arrays;
class BirthdaySurprise {
public static void main(String[] args){
// here are all the people
byte TSE = 122;
short LA = 184;
short ZE...
What is the import statement should I use?
class BirthdaySurprise {
public static void main(String[] args){
// here are all the people
byte TSE = 122;
short LA = 184;
short ZE = 195;
short AB...
Should I find something strange in the output of
byte aryOneAdder;
byte[] aryOne = new byte[123];
for(aryOneAdder = 1; aryOneAdder <121;){
//Now what I want to happen...
Thanks! That sure is a different way of looking at it!
My guess: last time a virus messed up Netbeans I uninstalled it and re-downloaded it, but looks like some crazy files where left behind somewhere. :/ I'm planing on uninstalling all programs and...
After turning of the pc for a few hours and trying again oddly the output has changed.
Output:
run:
0
BUILD SUCCESSFUL (total time: 1 second)
Even before changing the place of the array.
Any clue to what woke up indexOutOfBounds?
Like this?
byte aryOneAdder;
for(aryOneAdder = 1; aryOneAdder <121;){
//Now what I want to happen here is the for loop increments aryOneAdder
//till it's equal too...
Hello guys,
So I decided to experiment with what I know.
Start out with a small program then build on it till I used everything I know, with out making any mess.
I came up with an idea of a...