Java Programming Fundamentals Flashcard

Java Programming Fundamentals Flashcard

Assessment

Flashcard

Information Technology (IT)

9th - 12th Grade

Practice Problem

Hard

Created by

Wayground Content

FREE Resource

Student preview

quiz-placeholder

33 questions

Show all answers

1.

FLASHCARD QUESTION

Front

Which of the following correctly declares an integer variable in Java? Options: int num = 3;, int num <- 3;, integer num = 3;, int num == 3;

Back

int num = 3;

2.

FLASHCARD QUESTION

Front

What is the correct statement to import the Scanner class in Java?

Back

import java.util.Scanner;

3.

FLASHCARD QUESTION

Front

What is the correct way to create a Scanner object to read user input?

Back

Scanner sc = new Scanner(System.in);

4.

FLASHCARD QUESTION

Front

What method is used to find the length of a string in Java?

Back

length()

5.

FLASHCARD QUESTION

Front

Which method retrieves the character at a specific index in a string?

Back

charAt(int index)

6.

FLASHCARD QUESTION

Front

How do you check if two strings str1 and str2 are equal in Java? Options: str1 == str2, str1.equals(str2), str1.isEqualTo(str2)

Back

str1.equals(str2)

7.

FLASHCARD QUESTION

Front

Which method extracts a substring from a string?

Back

substring()

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?