import java.io.*;
class ArrayGet
{
int[] a = new int[20];
void FindMin(int[] a)
{
int min=a[0];
for(i=0;i<=10;i++)
{
if(a[i]<min)
min=a[i];
}
System.out.println("Thr smallest element in the array"+min);
}
void Display()
{
for(int i=0;i<10;i++)
{
System.out.println("The elements in array are "+ a[i]);
}
}
void GetMethod()
{
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
try
{
System.out.println("Enter the value");
for (int i = 0; i < 10; ++i)
{
a[i] = Integer.parseInt(br.readLine());
}
Display();
FindMin(int[] a);
}
catch(IOException e)
{
System.out.println("Error");
}
}
public static void main(String args[])
{
ArrayGet aa=new ArrayGet();
aa.GetMethod();
}
}
This is my Code i am trying to find a smallest element in the array.While passing array elements i am getting .Class Expected error please help me out in this regard