Member Avatar

I can't figure out why I'm getting this error, i've checked all the posts I can find here and they are all a method inside another method, which i'm pretty sure I don't have. This is the error message it gave me: Exception in thread "main" java.lang.RuntimeException: Uncompilable source code - illegal start of expression at rps.Rps.compChoice(Rps.java:63) at rps.Rps.main(Rps.java:20) This is my code: [CODE]package rps; import java.util.Random; import java.util.Scanner; public class Rps { Scanner keyboard =new Scanner(System.in); Random rand = new Random(); public static void main(String[] args) { String compType = ""; String playerType =""; int comp = compChoice (); …

Member Avatar
0
13
Member Avatar

So I have been working on this project for quite some time and I can't figure out why I keep getting an "Illegal Start of Expression" error. I tried moving the variables above the main method and that only returned the same error but instead of the error occuring at line 14, it occurs at the start of the next method(applet). Any help would be greatly appreciated! I'm sure it's just some stupid formatting error... package superhangman; import java.applet.Applet; import java.awt.*; import java.awt.event.*; import java.util.Random; public abstract class SuperHangman extends Applet implements ActionListener { public static void main(String[] args){ static …

Member Avatar
0
8
Member Avatar

I searched all over the net trying to find the reason behind why numbers are illegal as first characters in naming identifiers in C++, they say its illegal but they don't say why its illegal Id be glad if someone could tell me why :) , just curious

Member Avatar
0
5

The End.