java - Delete else statement but requires else statment -


So basically I'm doing a Java tutorial but I need to create a class file to follow along . Everything was already given to me but it gives me an error The error is: Delete other statements or anything along those lines. But when I delete it, it asks me to give another statement: I code: Is this a problem with eclipse or is there something wrong with the code?

  import java.io. *; Import java.text *; {Static inputstream reader R = new inputstream reader (system.) In public class; Fixed BufferedReader br = new BufferedReader (r); // standard system input read a string from the public static string getString () (try {return br.readLine ()}} hold (exception e) {return "";}} // standard string of a string form // input // Read a number in / and make the number public public static number getNumber () {string numberString = getString (); try {numberString = numberString.trim (). ToUpperCase (); Return NumberFormat.getInstance () .pars (number string); } Hold (Exception e) {// If there is an exception, then just return zero return new integer (0);}} // stand Read an int from a system system public static int iit (.) GetNumber (). IntValue ();} // standard system input public stable long getLong (longer) (long) (getNumber ()) LongValue (Read from);} // standard system input public float (GetFloat) read a float from {getNumber (). FloatValue ();} // standard system input public double getDouble (double) {returnNumber (double) ) Read a double from;} // standard system input public static letter g Read a four word from etChar () {string s = getString (); If (s.length ()> gt1 =) s.charAt (0); And back coming back ???? \ N ??? Line }}    

is actually causing the error to be here, whatever you have There is a mess in the mark that there are no \ nostostoffs ... I do not know what they are. (Because I like it in this way and using the plus in the rest of the statement is curly braces) Actually, in the form of rewriting the code as you did, after doing the alphabets, there were no errors:

  public static four getchar () {string s = getString (); If (s.length ()> gt1 = 1) {return s.charAt (0); } Other {Return '\ n'; }}   

Please, in the future, make sure to use the right indentations in your questions to make it very easy for us to read.

Comments

Popular posts from this blog

java - ImportError: No module named py4j.java_gateway -

python - Receiving "KeyError" after decoding json result from url -

.net - Creating a new Queue Manager and Queue in Websphere MQ (using C#) -