Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

This is using Netbeans. I am trying to run this file to see if I am following the steps correctly but it keeps saying I

This is using Netbeans. I am trying to run this file to see if I am following the steps correctly but it keeps saying I do not have a main method. I've tried doing the "public static void main(String [] args)" code but that just gives an error, and I am pretty certain that we don't need that in this project, due to the fact that we haven't even gone over it in class yet. I have more lines to add to this but I am trying to get a result for num1 before I go on to the rest of the code, which is mostly generating random variables.

I am very new to this so a detailed yet simple explanation would be greatly appreciated!

image text in transcribed

public class Random { public int main(String[] args) Random rand = new Random(); int num1 = random.nextInt( 20 - 0 + 1 ) + 0; System.out.println(num1); } Information Class "Questions. Question6" does not have a main method. OK

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Visualizing Health And Healthcare Data Creating Clear And Compelling Visualizations To See How Youre Doing

Authors: Katherine Rowell ,Lindsay Betzendahl ,Cambria Brown

1st Edition

1119680883, 978-1119680888

More Books

Students also viewed these Databases questions