Está Difícil entender Java

E olha que eu sei programar em C, mas tá difícil entender os problemas que acontecem no Java
Por exemplo, este código que não funciona:

class RangeClass
{
int[] makeRange(int lower, int upper)
{
int arr[] = new int[(upper - lower) + 1];

for	(int i = o; i < arr.length; i++)
     arr[i] = lower++;
return arr;     
}
public static void main(String arg[])
{
	int theArray[];
	RangeClass theRange = new RangeClass();
	
	theArray = theRange.makeRange(1,10);
	System.out.print("The array: [ ");
	for(int i = 0; i < theArray.length; i++)
	    System.out.print(theArray[i] + "");
	    
	System.out.println("]")    		
}

}

Alguém pode me dar uma luz?

2 coisas !!!

no último …

System.out.println("]") 

falta o “;”

e no …

for (int i = o; i < arr.length; i++) 

o “i” está sendo inciado pela letra “o”
… ai vai o código correto!

[code]class RangeClass{

int[] makeRange(int lower, int upper){
int arr[] = new int[(upper - lower) + 1];

for (int i = 0; i < arr.length; i++)
	arr[i] = lower++;
	return arr;
}

public static void main(String arg[]){

	int theArray[];
	RangeClass theRange = new RangeClass();
	theArray = theRange.makeRange(1,10);

	System.out.print("The array: [ ");

	for(int i = 0; i < theArray.length; i++)
		System.out.print(theArray[i] + "");
		System.out.println("]");
}

}[/code]

o resultado é …

The array: [ 12345678910]

Um conselho, use uma IDE mesmo que simples. Tem editores muito bons, simples e que te avisam sobre esses erros bestas, mas quando compila o javac avisa qual o erro. Nesse caso ele com certeza te deu o numero da linha e uma sujestão para sanar o erro. Só precisa de mais atenção e paciência. Java hoje é muito facil comparado a alguns anos atraz.

Eu uso o JCreator, e o problema no caso não é que está dando erros. Os erros apontados na mensagem acima foi erro de digitação minha mesmo. Quando eu compilo dá o seguinte erro:
Exception in thread “main” java.lang.NoClassDefFoundError: RangeClass

[quote=“rcmsj”]2 coisas !!!

no último …

System.out.println("]") 

falta o “;”

e no …

for (int i = o; i < arr.length; i++) 

o “i” está sendo inciado pela letra “o”
… ai vai o código correto!

[code]class RangeClass{

int[] makeRange(int lower, int upper){
int arr[] = new int[(upper - lower) + 1];

for (int i = 0; i < arr.length; i++)
	arr[i] = lower++;
	return arr;
}

public static void main(String arg[]){

	int theArray[];
	RangeClass theRange = new RangeClass();
	theArray = theRange.makeRange(1,10);

	System.out.print("The array: [ ");

	for(int i = 0; i < theArray.length; i++)
		System.out.print(theArray[i] + "");
		System.out.println("]");
}

}[/code]

o resultado é …

The array: [ 12345678910]

O problema é a mensagem de erro
Exception in thread “main” java.lang.NoClassDefFoundError: RangeClass

Esses outros ai foi erro de digitação mesmo, mas o erro acima persiste

Já resolvi obrigado…
É q eu tinha esquecido de recompilar e estava executando direto.
Agora tenho que tentar entender o código. Se alguém puder me ajudar, agradeço.