Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!
  • Guest, before posting your code please take these rules into consideration:
    • It is required to use our BBCode feature to display your code. While within the editor click < / > or >_ and place your code within the BB Code prompt. This helps others with finding a solution by making it easier to read and easier to copy.
    • You can also use markdown to share your code. When using markdown your code will be automatically converted to BBCode. For help with markdown check out the markdown guide.
    • Don't share a wall of code. All we want is the problem area, the code related to your issue.


    To learn more about how to use our BBCode feature, please click here.

    Thank you, Code Forum.

help please im noob

Dev_Socius

New Coder
Alright so I had this dumb idea to write some code that will insult you every time you request it to, I'm doing this on a site called Jdoodle, I'm using the Javascript program and this is what I have so far.


Java:
import java.util.Scanner;



public class TheRudeComputer{

 

    public static void main(String args[]) {

 

    Scanner scnr = new Scanner (System.in);

 

    String Yes;

    String No;

 

    System.out.println(" So, you ever wanna be  yelled at by a computer? You do? Dude what the hell is wrong with you...");

    System.out.println(" Well I guess I can help you with your joke of a problem, so do you want to be yelled at? Yes or No?");

    No = scnr.nextLine();

    System.out.println(" Well shit ok guess you don't want me to cuss you out. ");

    Yes = scnr.nextline();

    System.out.println(" Alrighty then! Lets get to it!");


And this is the error it gave me.


Bash:
TheRudeComputer.java:17: error: cannot find symbol

    Yes = scnr.nextline();

              ^

  symbol:   method nextline()

  location: variable scnr of type Scanner

1 error
    }
}
 
Last edited by a moderator:
Solution
Hey there! Very interesting idea!

I had a crack at this but I wasn't able to find it, but did notice that the error was showing that it didn't recognize the symbol, which I'm assuming it means (.) however I'll see if we can get some more eyes on this to get this resolved for you.

@Ghost @Hassapiko @Krusty the Senile @simong1993 @Tealk Any ideas?
Nevermind, I figured it out. In a few of the response lines with "nextLine" i forgot to cap the L.
Hey there! Very interesting idea!

I had a crack at this but I wasn't able to find it, but did notice that the error was showing that it didn't recognize the symbol, which I'm assuming it means (.) however I'll see if we can get some more eyes on this to get this resolved for you.

@Ghost @Hassapiko @Krusty the Senile @simong1993 @Tealk Any ideas?
yeah im clueless with the error, I would like to think its a symbol mistake but I dont know what I forgot..
 
Hey there! Very interesting idea!

I had a crack at this but I wasn't able to find it, but did notice that the error was showing that it didn't recognize the symbol, which I'm assuming it means (.) however I'll see if we can get some more eyes on this to get this resolved for you.

@Ghost @Hassapiko @Krusty the Senile @simong1993 @Tealk Any ideas?
Nevermind, I figured it out. In a few of the response lines with "nextLine" i forgot to cap the L.
 
Solution

New Threads

Latest posts

Buy us a coffee!

Back
Top Bottom