import java.util.Scanner; import java.io.*; import javax.swing.JOptionPane; public class Satellite { public static void main(String[] args) throws FileNotFoundException { Scanner sc=new Scanner(System.in); System.out.print("Enter the dimensions (Rows x Cols): "); int x=sc.nextInt(); int y=sc.nextInt(); System.out.println("Enter your rows"); String[][] field=new String[x][y]; for(int k=0;kmax) max=counter; findBiggest(x+1,y,field,max,counter); findBiggest(x,y+1,field,max,counter); findBiggest(x-1,y,field,max,counter); findBiggest(x,y-1,field,max,counter); } return max; } }