76 965
Assignments Done
Successfully Done
In June 2019

Answer to Question #11068 in Java | JSP | JSF for midya

Question #11068
public class Over {
public int stack(int j, int k) { return j + k; }
public int stack(int m) {
return m * m;
public int stack(float f) {
return (int)f * 5;
public static void main(String args[]) {
int n = 3;
float f = 3;
Over o = new Over();
System.out.println("" + o.stack(n, n));
System.out.println("" + o.stack(n));
System.out.println("" + o.stack(f));
what is this line do ? =====> over o = new over(); what is happen if we dont use this line?
Expert's answer
This line of code creates a new object class Over.
Newly created object are using in the code below, so if you remove the creation of the object, your compiler will print an error.

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!


No comments. Be first!

Leave a comment

Ask Your question

Privacy policy Terms and Conditions