I cannot find the syntax error here. Can anyone please help me to find this ?
Question is this – (2) Write a program to get 2 values as command line arguments and find the Minimum of those 2 using if-else.
class MinNumber{
{
public static void main(String [] myArray){
int length = myArray.length;
if((myArray[0][0]) < (myArray[0][1])){
System.out.println("Minimum number is : " + myArray[0][0]);
}
else{
System.out.println("Minimum number is : " + myArray[0][1]);
}
}
You can not compare
Stringvalue with<since it is not primitiveAlso Array is single array not double array.
Below is not safe code but simplest :