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 developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.