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 module in Python supports regular expressions?
- USB stands for:
- Which of the following is defined as an attempt to steal, spy, damage or destroy computer systems, networks, or their associated information?
- What is the primary purpose of implementing a 3-2-1 backup strategy?
- Which phase of systems analysis and design focuses on specifying the functional requirements of a system?
- Which page replacement algorithm replaces the page that will not be used for the longest period of time in the future?
- Which of the following is not a valid ACID property of a database transaction?
- Which cloud service model provides an environment for developers to build applications without managing the underlying infrastructure?
- Which of the following is the main risk associated with Cross-Site Request Forgery (CSRF) attacks?
- Which of the following page replacement algorithms results in the lowest page-fault rate for a given reference string but is often impractical to implement...
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)