code
Below is the code, and attached is the error message I keep getting, I have no idea what to do please help me.
It’s SNHU IT 511 Assignment 7-2 Shoutbox List Array java. I’m mind blown. I don’t know how anyone can learn java outside of a classroom.
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package Shoutbox;
import java.util.ArrayList;
import java.util.Scanner;
/**
*
* @author Josh Giarratano
*/
class Shoutbox {
public static void main(String[] args) {
Shoutbox sbox = new ShoutBox();
System.out.println(“Selected message: n”+sbox.shoutOutCannedMessage());
public String shoutOutCannedMessage() {
ArrayList<String> messages = new ArrayList<>();
messages.add.(“I need this java class”);
messages.add.(“According to the IDE, everything I do is wrong.”);
messages.add.(“This will drive me crazy”);
messages.add.(“I’m drinking Polar water.”);
messages.add.(“Polar water is naturally fizzy because it comes from Worcester tap water.”);
messages.add.(“I see a bunch of red things, I don’t know what I’m doing wrong, what else is new.”);
messages.add.(“I start my new job next week.”);
messages.add.(“I’m going to be a technical support engineer, that’s cool because I’m a sales guy now.”);
messages.add.(“Yup, this is proabably not going to work for me.”);
messages.add.(“Wish me luck, seems wrong.”);
messages.add.(“I’m finding it difficult to learn java on the internet.”);
System.out.println(“Choose a message”);
for(int i=0;i < messages.size(); i++){
System.out.println((i+1)+”.”+messages.get(i));
}
System.out.println(“Enter your choice: (1-10)”);
Scanner sc = new Scanner(System.in);
int option = sc.nextInt();
while(option <= 0 || option > 10) {
System.out.println(“Enter a valid number:”);
option = sc.nextInt();
}
}
}
}
run:
Exception in thread “main” java.lang.RuntimeException: Uncompilable source code – cannot find symbol
symbol: class ShoutBox
location: class shoutbox.Shoutbox
at shoutbox.Shoutbox.main(Shoutbox.java:16)
C:UsersJosh GiarratanoAppDataLocalNetBeansCache8.2executor-snippetsrun.xml:53: Java returned: 1
BUILD FAILED (total time: 1 second)