Question 161

Given:
public class MainMethod {
void main() {
System.out.println("one");
}
static void main(String args) {
System.out.println("two");
}
public static void main(String[] args) {
System.out.println("three");
}
void mina(Object[] args) {
System.out.println("four");
}
}
What is printed out when the program is excuted?
  • Question 162

    Given:
    public class Test<T> {
    private T t;
    public T get () {
    return t;
    }
    public void set (T t) {
    this.t = t;
    }
    public static void main (String args [ ] ) {
    Test<String> type = new Test<>();
    Test type 1 = new Test ();//line n1
    type.set("Java");
    type1.set(100);//line n2
    System.out.print(type.get() + " " + type1.get());
    }
    }
    What is the result?
  • Question 163

    Which two statements are true about localizing an application?
  • Question 164

    Given:
    public interface Moveable<Integer> {
    public default void walk (Integer distance) {System.out.println
    ("Walking");)
    public void run(Integer distance);
    }
    Which statement is true?
  • Question 165

    Given the definition of the Bookclass:

    Which statement is true about the Bookclass?