Question
What will the following Java code snippet output when executed, which uses a simple constructor and method overloading ? class Calculator { int add ( int a, int
What will the following Java code snippet output when executed, which uses a simple constructor and method overloading ? class Calculator { int add ( int a, int
b) { return a + b; } double add ( double a, double
b) { return a + b; } public static void main (String[] args) { Calculator calc = new Calculator (); System.out.println(calc.add( 5 , 10 )); // Line 1 System.out.println(calc.add( 5.5 , 10.5 )); // Line 2 }}
More Basics of Computers Questions
- Which of the following correctly describes the second normal form (2NF) in database normalization?
- Which of the following algorithm design techniques is characterized by breaking a problem into smaller sub-problems and solving each recursively?
- Which protocol is most commonly used in IoT devices for lightweight, efficient communication in constrained networks?
- The term "FAT" is stands for_____
- Which application-layer protocol is used to send email messages from a client to a server?
- In data communication networks, which protocol is responsible for ensuring reliable data transfer between devices over a network?
- Which of the following is NOT considered a core characteristic of cloud computing?
- Which all is/are Ransomware
- Definition of 2NF
- Operator overloading in C++
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)