how to code a 6/49 lottery draw using java and only random and scanner only is used.

Would not take code at all. Here's why. In such a system picking random numbers against a (random) lottery would have no better odds than taking your favorite set of numbers and playing it every game.

Finally you didn't show your efforts so far along with what stopped you.

Be a part of the DaniWeb community

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