PYQPulse
HomeMocksPracticePYQsUpdatesDashboard
PYQPulse

Timing-accurate mock tests and PYQs for SSC, Banking and Railway exams — so the real paper feels like a revision.

Exams

  • SSC exams
  • Banking exams
  • Railway exams
  • All exams

Practice

  • Practice questions
  • Mock test series
  • Sectional tests
  • Year-wise PYQs
  • Performance analytics

Company

  • About us
  • Help Centre
  • Pricing
  • Sign in

Legal

  • Privacy Policy
  • Terms of Service

Contact

  • hello@testwala.co.in
  • Telegram
  • +91 62816 87760

Practice interface modeled on the official exam pattern — not the official examination. PYQPulse is not affiliated with the Staff Selection Commission, IBPS, SBI, RBI, NABARD, SEBI or Indian Railways.

© 2026 PYQPulse. All rights reserved.

Built for aspirants, by aspirants.

HomeMocksPracticeStats
  1. Home
  2. ›
  3. PYQs
  4. ›
  5. RRB Junior Engineer / DMS / CMA
  6. ›
  7. 2019
  8. ›
  9. Q3688

RRB Junior Engineer / DMS / CMA 2019 · Question 3688 of 3719

What will be the output of the following Java program? class test {public static void main (String args [ ]) { System.out.println(20 + 30 + "Java"); System.out.println("Java" + 20 + 30); } }

  1. A50 Java Java 20 30
  2. B20 30 Java Java 50
  3. C2030Java Java50
  4. D50Java Java2030Correct

Answer: D. 50Java Java2030

Explanation

According to the Associativity Rule. class test {public static void main (String args [ ]) { System.out.println(20 + 30 + "Java"); ; // evaluated as (10 + 20) + "Java" System.out.println("Java" + 20 + 30); // evaluated as("Java" + 10) + 20 . } } So Output will be 50Java Java2030 Therefore option 4 is correct.

Source: RRB JE 2019 (CBT 2) (IT) Previous Year Paper (30 Aug 2019) — prepp.in solved-paper PDF (answer key with explanations) · reliable-secondary

← Q3687View full paper (3719 questions)Q3689 →

Practice the full RRB Junior Engineer / DMS / CMA 2019 paper

Timed test with all 3719 questions, just like the real exam.

Start test