Core Java

Core Java

University

10 Qs

quiz-placeholder

Similar activities

Enterprise development - JEE

Enterprise development - JEE

University

10 Qs

Evaluasi Pertemuan 12 DRPL TI-3B

Evaluasi Pertemuan 12 DRPL TI-3B

University

15 Qs

Pop Quiz- Abstraction, Algorithm

Pop Quiz- Abstraction, Algorithm

University

14 Qs

AWS ACF Módulo 2 - Economia e Faturamento na Nuvem

AWS ACF Módulo 2 - Economia e Faturamento na Nuvem

University

15 Qs

Kuis Dadakan ;)

Kuis Dadakan ;)

10th Grade - University

15 Qs

CHAPTER 1: COMPUTER SECURITY REVIEW

CHAPTER 1: COMPUTER SECURITY REVIEW

University

10 Qs

1-基本数据类型

1-基本数据类型

University

10 Qs

Basic on Operating System

Basic on Operating System

University

10 Qs

Core Java

Core Java

Assessment

Quiz

Computers

University

Practice Problem

Easy

Created by

Rashmi Prabha

Used 4+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

2 mins • 2 pts

1) Which statement is true about Java?

a) Java is a sequence-dependent programming language

b) Java is a code dependent programming language

c) Java is a platform-dependent programming language

d) Java is a platform-independent programming language

Answer explanation

Explanation: Java is called ‘Platform Independent Language’ as it primarily works on the principle of ‘compile once, run everywhere’.

2.

MULTIPLE CHOICE QUESTION

2 mins • 2 pts

2) Which one of the following is not a Java feature?

a) Object-oriented

b) Use of pointers

c) Portable

d) Dynamic and Extensible

Answer explanation

Explanation: Pointers is not a Java feature. Java provides an efficient abstraction layer for developing without using a pointer in Java. Features of Java Programming are Portable, Architectural Neutral, Object-Oriented, Robust, Secure, Dynamic and Extensible, etc.

3.

MULTIPLE CHOICE QUESTION

2 mins • 2 pts

3) Which environment variable is used to set the java path?

a) MAVEN_Path

b) JavaPATH

c) JAVA

d) JAVA_HOME

Answer explanation

Explanation: JAVA_HOME is used to store a path to the java installation.

4.

MULTIPLE CHOICE QUESTION

3 mins • 2 pts

4) What will be the output of the following Java code?

  1.  class box 
  2. {

  3. int width;

  4. int height;

  5. int length;

  6. }

  7. class main

  8. {

  9. public static void main(String args[])

  10. {

  11. box obj = new box();

  12. obj.width = 10;

  13. obj.height = 2;

  14. obj.length = 10;

  15. int y = obj.width obj.height obj.length;

  16. System.out.print(y);

  17. }

  18. }

a) 100

b) 400

c) 200

d) 12

5.

MULTIPLE CHOICE QUESTION

2 mins • 2 pts

5) Multiline comment is created using ___.

  1. a) //

b) /* */

c) <!--  -- >

d) None of these

6.

MULTIPLE CHOICE QUESTION

2 mins • 2 pts

6) Which of the following is the correct syntax to create a variable in Java?

a) var name;

b) int name;

c) var name int;

d) All of these

7.

MULTIPLE CHOICE QUESTION

2 mins • 2 pts

7) What will be the output of following Java code?

public class Main {
  public static void main(String[] args) {
    String str = "Hello";
    str = "Bye";
    System.out.println(str);
  }
}

a) Hello

b) Bye

c) Error

d) All of these

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?

Discover more resources for Computers