最近跑校招,做了一套java的笔试题. abstract class Name { private String name; public abstract boolean isStupidName(String name) { } } 答案: 错.abstract method不能有具体实现,即不能带花括号. public class Something { void doSomething () { private String s = ""; int l = s.length()…
JAVA程序改错 1. abstract class Name { private String name; public abstract boolean isStupidName(String name) { } } 答案: 错.abstract method必须以分号结尾,且不带花括号. 2. public class Something { void doSomething () { private String s = ""; int l = s.length(); } }…