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 PostGet the FIRST part of the program to work perfectly, THEN tackle the second part. You should NOT have a nextInt function in your class. It's already been written for you and comes with the Java installation. Use their Random class and use their nextInt function. Instantiate an object of …
Jump to PostOk I think I've got it:
But, my question now is: How to make the two rows to be separated, because now everything is ok just the numbers are in one column so it doesn't show which one is the first and which one is the second. Any idea?
println …
All 18 Replies
tux4life 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
tux4life 2,072 Postaholic
didi00 0 Junior Poster
tux4life 2,072 Postaholic
didi00 0 Junior Poster
didi00 0 Junior Poster
tux4life 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
tux4life 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.