Java Programming Fundamentals Flashcard

Java Programming Fundamentals Flashcard

Assessment

Flashcard

Information Technology (IT)

9th - 12th Grade

Hard

Created by

Quizizz 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()

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?