Solved

myArray[i] = (char)(myLongNum % 8);
it doesn't solve the problem also

Are you sure - it works on my Java compiler! Whayt exactly is the error you get with this version?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.