Curioustab Logo
Curioustab
Aptitude Reasoning CS GK Civil Past Papers
Free Test
Log in Sign up
Menu
Aptitude Reasoning CS GK Past Papers Free Test
Popular Topics
Time and Work Percentage Ratio & Proportion Simple Interest Number Series Analogy Indian History General Science
Explore
About Contact
Log in Sign up
  1. Home
  2. /
  3. Java Programming
  4. /
  5. Language Fundamentals

Language Fundamentals Questions

Practice Language Fundamentals MCQs with answers and explanations. Page 2 of 2.

Take a Free Test Browse Topics
Category
Java Programming
Topic
Language Fundamentals
Page
2 / 2
Mode
Practice

Questions

Open any question to view the answer and explanation.

All Topics
Java command-line arguments indexing: determine what prints and whether an exception occurs. public class CommandArgs { public static void main(String[] args) { String s1 = args[1]; String s2 = args[2]; String s3 = args[3]; String s4 = args[4]; // potential out-of-bounds System.out.print(" args[2] = " + s2); } } // Invocation: > java CommandArgs 1 2 3 4
Open
View answer
Java (jagged 3D int array) — how many lines will be printed by the nested loops? public class Test { public static void main(String [] args) { int[][][] x = new int[3][][]; int i, j; x[0] = new int[4][]; x[1] = new int[2][]; x[2] = new int[5][]; for (i = 0; i < x.length; i++) { for (j = 0; j < x[i].length; j++) { x[i][j] = new int[i + j + 1]; System.out.println("size = " + x[i][j].length); } } } } Count the total println calls produced by the inner loop.
Open
View answer
Prev 12

Practice smarter

Solve a few questions daily and revisit weak topics regularly to improve accuracy.

Take a Test Browse topics
Curioustab Logo Curioustab
Practice smarter. Improve faster.
Aptitude
  • Time and Work
  • Percentage
  • Ratio & Proportion
  • Simple Interest
  • Average
  • Compound Interest
Reasoning
  • Blood Relation
  • Course of Action
  • Number Series
  • Analogy
  • Coding Decoding
  • Logical Deduction
General Knowledge
  • Indian History
  • Indian Geography
  • Famous Personalities
  • General Science
  • Indian Politics
  • Sports
Explore
  • About
  • Contact
  • Sitemap
  • Privacy Policy
  • Terms of Service

© 2026 Curioustab.com — All rights reserved.

Built for exam practice, speed, and clarity.