java.lang.NoClassDefFoundError: numbertobinary/ShowBits

Im kinda new to Java so bare with me please

i got this error ^ and i dont understand why. here is part of the code, i took the unnessisary stuff out. I hope you can help

class ShowBits {

int numbits;

ShowBits(int n){

numbits = n;

}

void show(long val) {

long mask = 1;

//left shift a 1 into the proper position

}

}

// DEMO

class ShowBitsDemo {

public static void main(String args[]) {

ShowBits b = new ShowBits(8);

ShowBits i = new ShowBits(32);

ShowBits li= new ShowBits(64);

System.out.println("123 in binary: ");

b.show(123);

}

}

i been working on this for like 2 hours now and i realy dont want to waste any more time on it but what can i do.

thanks in advance

[809 byte] By [Brad84ia] at [2007-11-27 2:23:41]
# 1
I think we need a little more code please and what are the errors/
SandyReda at 2007-7-12 2:29:35 > top of Java-index,Java Essentials,New To Java...
# 2

You got more code, but the error still comes up with the previous code, I sould add that im using NetBeans IDE

the error is: java.lang.NoClassDefFoundError: numbertobinary/ShowBits

Exception in thread "main"

__

class ShowBits {

int numbits;

ShowBits(int n){

numbits = n;

}

void show(long val) {

long mask = 1;

//left shift a 1 into the proper position

mask <<=numbits-1;

int spacer= 0;

for (;mask !=0; mask >>>= 1) {

if ((val & mask) !=0) System.out.println("1");

else System.out.println("0");

spacer++;

if ((spacer % 8) == 0) {

System.out.println(" ");

spacer =0;

}

}

System.out.println();

}

}

// DEMO

class ShowBitsDemo {

public static void main(String args[]) {

ShowBits b = new ShowBits(8);

ShowBits i = new ShowBits(32);

ShowBits li= new ShowBits(64);

System.out.println("123 in binary: ");

b.show(123);

}

}

Message was edited by:

Brad84i

null

Brad84ia at 2007-7-12 2:29:35 > top of Java-index,Java Essentials,New To Java...
# 3

I found that it has nothing to do with the code at all, its to do with the package it self. I tried a different code and still the same thing. This concludes that for some reason it is not finding the class at on line 1 of the program. I dont understand why though. does any know the answer to this?

Brad84ia at 2007-7-12 2:29:35 > top of Java-index,Java Essentials,New To Java...