4
I have the mini program, which I will show you next. When compiling at the command prompt, I got an error on line 47 which says:
illegal start of Expression
I have in the program a list of entries of the size defined in ListaArray. Code:
import java.util.*;
public class NívelDePontos
{
   private static int identificar(Scanner kb, String mensagem, String mensagemErro) 
   {
        while (true) 
        {
            System.out.println(mensagem);
            try 
            {
                return Integer.parseInt(kb.nextLine());
            } 
            catch (NumberFormatException e) 
            {
                System.out.println(mensagemErro);
            }
        }
    }
    private static boolean lerSimNao(Scanner kb, String mensagem, String mensagemErro) 
    {
        while (true) 
       {
            System.out.println(mensagem);
            String x = kb.nextLine();
            if (x.equalsIgnoreCase("S")) return true;
            if (x.equalsIgnoreCase("N")) return false;
            System.out.println(mensagemErro);
        }
    }
    public static void main(String[] args) 
    {
        Scanner kb = new Scanner(System.in);
        {        
            int identidade = identificar(kb, "Introduza o número seu número de Telefone ou ID Thumba ", "Registamos um erro . Por favor, tente novamente.");
            System.out.println("Bem-vindo, utilizador" +" " + identidade + ".");
             int count, msg, nivel1;
             int[] ListaArray;   ListaArray = new int[100];
             while(msg <= nivel1)
             {
                 count = msg;
                 count++;
                 return <count>;            
             }
             System.out.println("Obrigado, até a próxima.");
        }
    }
}
Whenever you get an error, also enter where is the error line, you say line 47 but where is line 47?
– user28595
return <count>;This section has a syntax error, the right one is justreturn count;– user28595