Simple Java Program compile errors getting

import java.io.*;
class A
{
int c=0;
int i[50];
int l;
int j[50];
int n;
int k;
int P;
public void EvenOdd()
{
for(n=1;n<=100;n++)
{
if(n%2==0)

		System.out.println(n);
		}
	}
	public void Prime()
	{
		for(P=1;P<=100;P++)
		{
		for(l=P;l<=P;l++)
		{
			if(P%l==0)
			c++;
		}
		if(c==2)
			for(k=0;k<=P-1;k++)
			{
			j[k]=P;
		System.out.println(j[k]);
			}
		}
	}
}
class B
{
	public static void main(String args[])
	{
		A a=new A();
		a.EvenOdd();
		a.Prime();
	}
}

This is my code to find the prime numbers in the specified range but when i am compiling the program there are lot of errors can u please suggest me what is wrong in it? syntax error or any other errors?

Java is not C/C++ and statement

int i[50];

is not valid, you have to use

int[] i = new int[50];

Thank u so much betlista Its working fine now…