Stefan Jaeschke

Greenhorn
+ Follow
since Oct 03, 2006
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Stefan Jaeschke

Hi,
Thank you for your help and please excuse my stupid question.

Unfortunatly I found no other way to solve my problem: I want to create two (or more) arrays with different lengths.

I could create the arrays inside the main, but that look much like old school non OO-Programming, right? Otherwise I could create a new class just for the array length:


I just can not believe that this is real OO ...

So - do you have any ideas? I hope there is an easy way I just can not see.

Thanks!

Bye Stefan
17 years ago
Hi experts,
i am playing a little bit around with arrays an I am stuck on this (my intention was to create some code as a framework for sorting experiments):



The Code works fine but I wanted to put some flexibility into it:



Filling the Array still works fine but unfortunatly the showMe-Method raises an Exception: java.lang.NullPointerException (the array is empty - isn't it?).

So how can someone help me? I am looking for a way to fill and use the array without declaring the array-length inside the code. Any ideas (Thanks in advance)?


Bye Stefan
17 years ago