473,386 Members | 1,763 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

pls do help: random declaration error...

import java.util.Random;
public class random_game {
public static void main (String args[]) {

int ctr,guess;
Random r = new Random();
System.int.println(r.input.int(100));
int n = r.nextinput(100);

System.out.print("Enter guess number: ");
guess = input.nextInt();
guys, what's the problem with this code?i'm new in java programming, pls. help, error says:

<identifier expected>
System.int.println(r.input.int(100));

and not a statement
System.int.println(r.input.int(100));

pls help...thanks so much
Sep 2 '07 #1
3 1505
Ganon11
3,652 Expert 2GB
I don't think System.int is a proper class/object, and I don't think the Random class has a member named input. Maybe you should take a look at the System.out and Random specifications, and try to find what you want from there...these method names look made up.
Sep 3 '07 #2
i already did that... same error... :(
pls help...
Sep 3 '07 #3
madhoriya22
252 100+
i already did that... same error... :(
pls help...
Hi,
I think u should read a bit more about java or atleast http://java.sun.com/j2se/1.4.2/docs/...il/Random.html Random class api.
Sep 3 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Rahul | last post by:
Hi Everybody I have some problem in my script. please help me. This is script file. I have one *.inq file. I want run this script in XML files. But this script errors shows . If u want i am...
5
by: basoul | last post by:
I have to make a game with 15 x 26 grid sigular array (array of 390 charecters) and im supose to load the ships which are charecters horozontally. only 4 are needed and the function im stuck on is...
0
by: urkel | last post by:
Hello everybody, I have these errors on C program that may be because of random number definition. I use an SSH to compile C like in Linux. May be you have idea whether the errors are due to the...
3
by: TamaThps | last post by:
I have to write a program that lets the user play the game of Craps. As of right now it is incomplete and I have run into some errors. It's my first time using functions instead of the program all...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.