Test
java test 1
By Tamilarasi.R · java · Professional development · Published Nov 3, 2026 · New
A copy is added to your account. Change it however you like.
Questions
- 1Which component is responsible for executing Java bytecode?
- Which data type is used to store a single character?
- 3.Which operator is used to check whether two conditions are true?
- 4.Which statement is used to make decisions in Java?
- 5.Which loop executes at least once?
- What is the index of the first element in a Java array?
- Which keyword is used to terminate a loop?
- Which statement is used to skip the current iteration?
- How many indexes are required to access an element in a 2D array?
- Which property is used to find the length of an array?
- What is the difference between JDK, JRE and JVM?
- Differentiate between while and do-while loops.
- What is the difference between break and continue?
- What is a two-dimensional array? Give an example.
- Predict the Output int a = 10; int b = 5; System.out.println(a + b); System.out.println(a * b);
- Predict the Output int age = 16; if (age >= 18) { System.out.println("Eligible"); } else { System.out.println("Not Eligible"); }
- Predict the Output for (int i = 1; i <= 5; i++) { System.out.println(i); }
- Predict the Output int i = 1; while (i <= 3) { System.out.println(i); i++; }
- Predict the Output int[] numbers = {10, 20, 30, 40}; System.out.println(numbers[2]); System.out.println(numbers.length);
- Find the Error for (int i = 1; i >= 5; i++) { System.out.println(i); }
- Find the Error int[] numbers = {10, 20, 30}; System.out.println(numbers[3]);
- Programming Questions public class Main { public static void main(String[] args) { int number = 10; if (number % 2 == 0) { System.out.println("Even Number"); } else { System.out.println("Odd Number"); } } }
- Print numbers from 10 to 1. public class Main { public static void main(String[] args) { for (int i = 10; i >= 1; i--) { System.out.println(i); } }}
- Print five student names using enhanced for loop. public class Main { public static void main(String[] args) { String[] students = { "Anu", "Priya", "Kavi", "Ravi", "Tamil" }; for (String name : students) { System.out.println(name); } } }
- Create and print a 2D array. public class Main { public static void main(String[] args) { int[][] numbers = { {10, 20, 30}, {40, 50, 60} }; for (int i = 0; i < 2; i++) { for (int j = 0; j < 3; j++) { System.out.print(numbers[i][j] + " "); } System.out.println(); } } }
- Write a Java program to: Create an integer array containing five marks. Print all five marks. Calculate and print the total. Calculate and print the average.
More like this
Test
BASIC PHYTON
Coding · Grade 7 – Grade 9 · New · Nov 3, 2026
Quiz
Numbers
Mathematics · Grade 1 · Used 1 time · Oct 27, 2026
Presentation
Algebra
For Learning
Mathematics · Grade 7 · New · Nov 2, 2026
Test
Cybertronix - CT Quiz
Grade 4 · New · Oct 22, 2026
Test
Grade 2 Mathematics E-Assessment
Mathematics · Grade 2 · New · Nov 5, 2026
Test
quizz
All grades · New · Nov 5, 2026