5.Variables

5.Variables

Professional Development

40 Qs

quiz-placeholder

Similar activities

Computer Science Quiz

Computer Science Quiz

Professional Development

40 Qs

Quiz 1

Quiz 1

Professional Development

35 Qs

Data Structures Quiz

Data Structures Quiz

Professional Development

40 Qs

Wise bees - Quizizz 1

Wise bees - Quizizz 1

Professional Development

35 Qs

Progress Test - Modules 01 and 02 - #9

Progress Test - Modules 01 and 02 - #9

Professional Development

40 Qs

ASVABUNLIMITED Word Knowledge Homework Set 2

ASVABUNLIMITED Word Knowledge Homework Set 2

Professional Development

35 Qs

PBC-v7.2

PBC-v7.2

Professional Development

41 Qs

TOPIC 01

TOPIC 01

Professional Development

40 Qs

5.Variables

5.Variables

Assessment

Quiz

English

Professional Development

Hard

Created by

ANIL KUMAR

FREE Resource

40 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following are the four types of variables in Java?
String, int, double, char
String, int, float, boolean
String, char, float, boolean
String, int, float, char

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which operator is used to change the value of a variable in Java?
==
!=
<=
=

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following statements is true about a local static instance variable in Java?
It can only be declared within a method
It can be declared as both local and static variable
It can only be used within a single instance of a class
Memory allocation for static variables occurs every time the method is called

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What are the steps to declare a variable in Java?
Specify the variable's name, provide a value, and end the line with a semicolon
Provide a name for the variable, end the line with a colon, and specify the variable's data type
Specify the variable's data type, provide a name for the variable, and end the line with a semicolon
Specify the variable's value, provide a data type, and end the line with a semicolon

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following describes the Java data types?
Binary and hexadecimal
Primitive and non-primitive
Integers and floating-point
Functions and procedures

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How can we change the value of a variable in Java?
Using the DEBUG command
Using the EVAL command with assignment
Using the PRINT command with assignment
Using the VAR command with assignment

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How can you change a value in a string in C++?
Double quotes
Single quotes
Index position or number
replace() function

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?