I need the highest value among North, south, east and west and in result, i just have to return the name north, south, east or west. Highest value have to be obtained by comparing all the values of north, south, east and west.
Below is my code snippet.
public String startpgm(String x){
String result=null;
double priority = 0;
double North = 1;
double South = 3;
double East = 4;
double West = 5;
System.out.println("Priority:"+Math.max(North, South)); //I am getting the max value, what i need is North or South!!
priority= Math.max(North, South);
result = Double.toString(priority);
return result ;
}