Start learning →

ICSE Class 8 Java Data Types and Variables — practice questions

Explore 28 free Java Data Types and Variables questions in ICSE Class 8 Computer Applications. Open each question or exercise to read its content, reference answers and available explanation.

Practise Java Data Types and Variables with Quill →

Java Data Types and Variables questions and exercises with answers

Showing questions 1–28 of 28.

Which logical values can a boolean variable hold in Java?Read the answer and worked solution →Which characteristic describes how Java treats identifier letter casing?Read the answer and worked solution →How is a variable declared according to standard Java language syntax?Read the answer and worked solution →Which suffix specifies that an integer literal is interpreted as a long?Read the answer and worked solution →Which keyword introduced in Java 10 infers variable types automatically?Read the answer and worked solution →What value does a Java reference variable hold when pointing to nothing?Read the answer and worked solution →Where can fields, also known as class variables, be declared in Java?Read the answer and worked solution →Which field modifier permits a variable to be initialized only once?Read the answer and worked solution →What are variables formally defined as in Java programming syntax?Read the answer and worked solution →What term describes data types that are not primitive in computer science?Read the answer and worked solution →What precisions do the Java floating-point types float and double have?Read the answer and worked solution →Why are primitive data types not considered objects in Java?Read the answer and worked solution →Why were unsigned integer data types omitted from the Java language?Read the answer and worked solution →Which symbol category can be validly included inside a Java identifier?Read the answer and worked solution →How many Java words are strict keywords that cannot name any identifier?Read the answer and worked solution →What data type is assigned to the null literal in the Java language?Read the answer and worked solution →Where is an object created when its constructor is executed in Java?Read the answer and worked solution →Which field modifier ensures all threads see a consistent variable value?Read the answer and worked solution →Which modifier specifies that a field will not be serialized in Java?Read the answer and worked solution →Which class represents numeric values convertible to Java primitive types?Read the answer and worked solution →How is char categorized in the JVM primitive type specification?Read the answer and worked solution →Which JVM primitive type cannot be accessed from Java source code?Read the answer and worked solution →How many char values represent a Unicode code point in a surrogate pair?Read the answer and worked solution →Which letter represents the boolean primitive type in JVM type signatures?Read the answer and worked solution →Match each primitive Java data type with its memory size in bytes:Read the answer and worked solution →Match each Java data type with its default initial value:Read the answer and worked solution →Match each type conversion term with its mechanism in Java:Read the answer and worked solution →Match each variable naming rule in Java with its specification:Read the answer and worked solution →

Worked practice questions

Which logical values can a boolean variable hold in Java?

  1. true and false
  2. 0 and 1 values
  3. yes and no tags
  4. high and low bit
Show answer and solution

Correct answer: A. true and false

A Java boolean variable is a logical type that only stores true or false.

Open this question →

Which characteristic describes how Java treats identifier letter casing?

  1. Accent-sensitive
  2. Format-neutral
  3. Case-sensitive
  4. Case-insensitive
Show answer and solution

Correct answer: C. Case-sensitive

Java identifiers are case-sensitive so uppercase and lowercase names differ.

Open this question →

How is a variable declared according to standard Java language syntax?

  1. Using memory size
  2. Writing type and name
  3. Using call keyword
  4. Writing index address
Show answer and solution

Correct answer: B. Writing type and name

Variables in Java are declared by specifying their data type followed by their name.

Open this question →

How to practise

  1. Choose a Java Data Types and Variables question and try to work out your answer.
  2. Open the question to check the correct answer and read its worked solution.
  3. Continue in the app for bite-sized lessons, explanations and review with Quill. You can start without creating an account.

Put it into practice

Continue with Java Data Types and Variables practice for ICSE Class 8. Read explanations as you go. No signup form needed to start.

Practise Java Data Types and Variables →

More Computer Applications topics