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 page replacement algorithm results in the lowest page-fault rate for any reference string, but is often impractical to implement?
- Which is/are correct w.r.t Passive attacks
- In I/O scheduling, which of the following algorithms minimizes seek time but may lead to starvation of requests at the ends of the disk?
- What is the main advantage of using incremental backups over full backups?
- Which of the following statements about Constructors in Object-Oriented Programming is correct?
- Appending value to list in python
- Which of the following web application attacks involves tricking a user into executing unwanted actions on a web application where they are authenticated?
- Which of the following best describes the main advantage of a Management Information System (MIS)?
- Which of the following is NOT considered a core characteristic of cloud computing?
- In the context of virtualization, paravirtualization differs from full virtualization in which of the following ways?
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)