Latest Update 100% Pass
What will `System.out.println(100 % 3);` output?
✔✔ 1
How do you check if two strings are equal in Java?
✔✔ Using the `.equals()` method
What will `System.out.println(3 == 3.0);` return?
✔✔ true
What will `System.out.println(2 + "2" + 2);` output?
✔✔ 222
How do you declare a method in Java?
✔✔ Using a return type, method name, and parentheses
1
,What is the default value of a float variable in Java?
✔✔ 0.0f
What does `System.out.println(1 | 2);` output?
✔✔ 3
Which method is used to find the length of a string?
✔✔ length()
What will `System.out.println("Hello".contains("lo"));` return?
✔✔ true
Which keyword is used to exit from a loop in Java?
✔✔ break
What will `System.out.println("apple".compareTo("banana"));` return?
✔✔ A negative number
2
, What will `System.out.println("Java".repeat(2));` print?
✔✔ JavaJava
What is the output of `System.out.println(" ".trim().isEmpty());`?
✔✔ true
What is the main purpose of the Java programming language?
✔✔ To create platform-independent applications using object-oriented principles
What is the extension of a Java source code file?
✔✔ .java
What does the `public` keyword mean in a Java class declaration?
✔✔ It makes the class accessible from any other class
Which method serves as the entry point for a Java application?
✔✔ main()
3