/* package whatever; // don't place package name! */ import java.util.*; import java.lang.*; import java.io.*; /* Name of the class has to be "Main" only if the class is public. */ class Ideone { { int firstX; int firstY; int secondX; int secondY; boolean canContinue = false; int firstCl = sc.nextInt(); int secondCl = sc.nextInt(); sc.close(); if(!(firstB < 'g' && firstB >= 'a') || !(secondB < 'g' && secondB >= 'a') || firstN == secondN){ } else{ if((firstCl%2 == 0 && (str.charAt(0) == 'b' || str.charAt(0) == 'd' || str.charAt(0) == 'f' || str.charAt(0) == 'h')) && (secondCl%2 == 0 && (str1.charAt(0) == 'a' || str1.charAt(0) == 'c' || str1.charAt(0) == 'e' || str1.charAt(0) == 'h'))){ canContinue = true; } if(!canContinue){ } else{ firstX = firstCl; firstY = getCoordinate(str.charAt(0)); secondX = secondCl; secondY = getCoorinate(str1.charAt(0)); if(firstY - secondY < 0){ int totalY = secondY - firstY; int totalX = secondX - firstX; if(totalX < 0){ totalX = totalX * -1; } } } } } public int getCoordinate(Char ch){ if(ch == 'a' || ch == 'b'){ return 0; } else if(ch == 'c' || ch == 'd'){ return 1; } else if(ch == 'e' || ch == 'f'){ return 2; } else if(ch == 'g' || ch == 'h'){ return 3; } } }
Standard input is empty
Main.java:52: error: cannot find symbol public int getCoordinate(Char ch){ ^ symbol: class Char location: class Ideone Main.java:21: error: cannot find symbol String str = sc.next; ^ symbol: variable next location: variable sc of type Scanner Main.java:22: error: cannot find symbol String str1 = sc.next; ^ symbol: variable next location: variable sc of type Scanner Main.java:24: error: cannot find symbol if(!(firstB < 'g' && firstB >= 'a') || !(secondB < 'g' && secondB >= 'a') || firstN == secondN){ ^ symbol: variable firstB location: class Ideone Main.java:24: error: cannot find symbol if(!(firstB < 'g' && firstB >= 'a') || !(secondB < 'g' && secondB >= 'a') || firstN == secondN){ ^ symbol: variable firstB location: class Ideone Main.java:24: error: cannot find symbol if(!(firstB < 'g' && firstB >= 'a') || !(secondB < 'g' && secondB >= 'a') || firstN == secondN){ ^ symbol: variable secondB location: class Ideone Main.java:24: error: cannot find symbol if(!(firstB < 'g' && firstB >= 'a') || !(secondB < 'g' && secondB >= 'a') || firstN == secondN){ ^ symbol: variable secondB location: class Ideone Main.java:24: error: cannot find symbol if(!(firstB < 'g' && firstB >= 'a') || !(secondB < 'g' && secondB >= 'a') || firstN == secondN){ ^ symbol: variable firstN location: class Ideone Main.java:24: error: cannot find symbol if(!(firstB < 'g' && firstB >= 'a') || !(secondB < 'g' && secondB >= 'a') || firstN == secondN){ ^ symbol: variable secondN location: class Ideone Main.java:37: error: non-static method getCoordinate(Char) cannot be referenced from a static context firstY = getCoordinate(str.charAt(0)); ^ Main.java:39: error: cannot find symbol secondY = getCoorinate(str1.charAt(0)); ^ symbol: method getCoorinate(char) location: class Ideone 11 errors
Standard output is empty