jps,
Thanks for taking the time in explaining this java code in "laymans term".
So I did the below an added this Guess method = new Guess(); in the main method.
And changed this line of...
Type: Posts; User: GIban
jps,
Thanks for taking the time in explaining this java code in "laymans term".
So I did the below an added this Guess method = new Guess(); in the main method.
And changed this line of...
Sounds like it's time to get the teenager more involved.
Yes, I am hoping he enjoys programing and will stay with it as I got some PIC circuits that I would like for him to program. Or, even...
Have you tried Google about: how to call a method
I tried everything you suggested and Google. At my current level of "Self Tutoring", Java or any other programing is just not for me. Been there...
JPS,
Here's what I am trying to understand more for me than my son.
I have two method(), the first method() generates a random number, the second method() asks for a user input. The first...
Ok ... more reading and still can't figure out how to make both of these two method() work together. Anymore reading and I am positive that it can't be done without removing one line of code.
...
I give up ... hours spent and can't make it work per method. Works if I just remove this string of code:
}
public static void guess(){
Norm,
I appreciate you guiding me in the right direction. I spent hours trying to figure this out all morning. I know you gave me some hints but I am not getting it. Again, my approach is one bit...
Can you explain this part of the code:
for(int x = 0; x < 100; x++)
I followed the coding convention, variables and method start with a lower case and every first word a Upper Case.
The guess() method should return a value to the user but at this point I just want...
Please correct me if I am using the wrong Java terminology. I am giving it a shot to learn this Java language along side my son. I am writing the code in a logical approach. Each approach is a...
After numerous hours and attempts at trying to understand Java on this particular coding of "Guessing The Number", I was able to find a code similar to my initial question.
Unfortunately, and as...
Correct, the compiler could not find the variable: in because that was the error. The variable should have been: input.
I'm currently self tutoring myself in Java. Having fun but I wish it was...
I highlighted the error in red.
x = in.nextInt();
"cannot find symbol - variable in"
x =in.nextInt();
My son and classmate figured out the error. But can some explain why?
public static void Answer(int Answer)
{
Scanner input = new Scanner(System.in);
int x;
System.out.println("Enter your...
I edit the code and removed the comments.
The error that the compiler is highlighted is:
public static void Answer(int Answer)
{
Scanner input = new Scanner(System.in);
...
I will be playing around with his code once I get to my home computer. The IDE that I installed is called Bluejay.
I was reading a tutorial for java but cannot grasp this code, such as the meaning...
We tried to break the code into sections by using the comment syntax to isolate each section and to see each portion of each code compile, but it didn't work.
So when faced with multiple tasking...
Curmudgeon,
I am his Dad and he is not doing to well in this subject. I only found this out at Parent Teacher Conference last night. So I took the liberty to be proactive. I will not give him the...
import java.util.Scanner;
import java.util.Random;
public class TheBrainGame2
{
static String Rating;
static int count;
static int Random;
static int Guess;