Question
What is the output of the following Java program? class Test { static int x = 5; static { x += 10; System.out.print(x+" "); } public static void main(String[]
What is the output of the following Java program? class Test { static int x = 5; static { x += 10; System.out.print(x+" "); } public static void main(String[]
a) { System.out.print(x+" "); x++; System.out.print(x); } static { x *= 2; } }
More IT Operating System Questions
- Fill in the correct option for 27 blank space.
- Using a bottom-up dynamic programming approach to calculate the 6th Fibonacci number (F(0)=0, F(1)=1), what are the values stored in the DP table F at indi...
- Which network security device typically enforces a policy based on IP, port and protocol and can operate at transport and application layer when deep inspe...
- Consider the following Java code snippet: import java.util.PriorityQueue; public class HeapQuestion5 { public static void main(Strin...
- A Java method tries to get the length of an array and a string. public class LengthChecker { public void checkLengths() { String[] names = {...
- When using a debugger, what does "stepping over" a function call mean?
- What is the output of the following C code using #define? #include #define SQUARE(x) x*x int main() { int a = SQUARE(2+3); printf("%d", a);...
- Deletion of an employee from table also deletes that employee from another table. This kind of delete is called :
- A system uses paging with a page size of 4 KB and a logical address space of 32 bits. How many bits are needed for the page offset, and how many entries wo...
- Perform a dry run of Binary Search for target = 29 in the sorted array [2, 12, 15, 17, 27, 29, 45]. What are the values of mid in each iteration until the ...
Hey! Ask a query
Please enter email id
The email must be a valid email address.
Please enter Mobile Number
Please enter valid Mobile Number
Please enter your Doubt
Think You're Ready for RBI Grade B?
RBI Grade B 2026 Phase 1 Memory Based Paper
- 200 Questions with Detailed Solutions
- Section-wise Coverage (GA, English, Quant & Reasoning)