Can someone help me to make a program in java:
1. Generate 2 rows of 50 random numbers (int) from 0 to 99.
2. Search the numbers that appear in the first row, but not in the second, and numbers that appear in the second row but not in the first. Print the result.
Help someone, please?
didi00 0
Junior Poster
Recommended Answers
Jump to Post>Can someone help me to make a program in java
Yes we can help you, please post the code you have so far (read this) and tell us where exactly you're having problems with.
Jump to PostI think you should set up a 2-D array of random integers (2 rows, 50 columns) and store them as you generate them. Right now you are displaying them, but then they are gone, so you won't be able to display them later, nor will you be able to search …
Jump to PostYou have to create a new Object of type Random before you can use it to generate the random numbers. If you go to the link Vernon gave you, you will notice that the class is called Random. So to use a method of this class, you need to create …
Jump to PostSorry for the stupid questions, but I'm beginner in Java...
There's nothing wrong with being a beginner, and by the way: questions aren't stupid, as long as you learn something of it :)
Jump to Post>Is it ok and help with the errors?
Does it compile? Then it's syntactically correct.
Does it run and give the expected output? Then you're pretty sure that you haven't made a mistake :)
All 18 Replies
mvmalderen 2,072
Postaholic
didi00 0
Junior Poster
VernonDozier 2,218
Posting Expert Featured Poster
didi00 0
Junior Poster
BestJewSinceJC 700
Posting Maven
didi00 0
Junior Poster
mvmalderen 2,072
Postaholic
didi00 0
Junior Poster
mvmalderen 2,072
Postaholic
didi00 0
Junior Poster
didi00 0
Junior Poster
mvmalderen 2,072
Postaholic
didi00 0
Junior Poster
VernonDozier 2,218
Posting Expert Featured Poster
didi00 0
Junior Poster
VernonDozier 2,218
Posting Expert Featured Poster
didi00 0
Junior Poster
shantechi -1
Newbie Poster
mvmalderen
commented:
The problem was already solved 24 hours AGO !!! -1
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.