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 is a characteristic feature of a Relational Database Management System (RDBMS)?
- 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...
- Which CPU scheduling algorithm minimizes the average waiting time, assuming all processes arrive at the same time?
- Which application layer protocol is primarily responsible for sending emails?
- Which network device operates at both the data link and network layers of the OSI model, and is responsible for routing data packets between networks?
- Which of the following sorting algorithms is NOT stable?
- What is the main purpose of the AJAX technique in web development?
- In a hypervisor-based virtualization environment, which of the following storage solutions is best suited for providing high availability and scalability f...
- Which of the following is a primary function of a firewall?
- Which of the following is NOT one of the SOLID principles of software design?
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)