What will be the output of the following code snippet? double STATIC = 2.5; System.out.println(STATIC);

Java concepts and its programming MCQs for PPSC, FPSC, NTS, and Pakistan government job tests. Select an option below, then read the explanation.

PPSCFPSCNTSPakistan govt jobs
Subject
Java concepts and its programmingsoftware-engineering-mcqs › java-concepts-and-its-programming
Published
18 Apr 2019
Last updated
28 May 2026

Browse all Java concepts and its programming MCQs

Choose the correct answer

Explanation

The code declares a double variable named STATIC and assigns it the value 2.5. Since STATIC is not a reserved keyword in Java, the code compiles and runs successfully, printing 2.5 to the console.

PakQuizHub — free MCQs and past papers for Pakistan government job tests. Content is for educational practice only.