I try to print out 6 random numbers from 40 numbers ex( 20,5,1,40,31,29) the program which I have writen is ok, but I don't want that the program writes a random number more than one time. ex 20,5,1,40,31,29) is ok ex 20,5,5,40,31,29) is wrong. // how do I fix it?
Hi! I am trying to write a delete and an insert method. I have problem whit insert method. After the running of program I get. Delete:1,2,6,7 It is correct Insert:1,2,3,5,6 I lost number 4
Hi! I want to learn java but I have a few questions. 1- I know about data type(Int, double, float....), but I do not know how an object works like a type, and what does it mean? How does it work?
I know b1 and b2 both have the same value because they refer to the sme Object(box). but if we have this: Box b1=new Box; Box b2=b1; b1=null; //b1 has been set to null, but b2 //still points to the original object. my question is if b1=null, but why b2 still points to orignal object(Box) --------------------------------------------- 3- I have problem whit private keyword. I know what dose it it mean , but I do not know how dose it work and when we should write private. and how can we hide our code whit private. thanks