Software Engineer Net Developer Interview Questions

666,190 software engineer net developer interview questions shared by candidates

What is the output of the following program? class Poly { static int length; int width; public Poly(int l, int w) { length = l; width = w; } int area() { return 2*length*width; } } class Rect extends Poly { public Rect(int l, int w) { super(l,w); } int area() { return length*width; } } class Solution { public static void main(String args[]) { Poly rect1 = new Poly(5,5); Poly rect2 = new Rect(6,4); int area1 = rect1.area(); int area2 = rect2.area(); System.out.println(area1 + " " + area2); } } 30 24 60 48 60 24 25 24 50 48 48 24 50 24
avatar

Android Developer

Interviewed at Smartprix

3.4
Aug 3, 2016

What is the output of the following program? class Poly { static int length; int width; public Poly(int l, int w) { length = l; width = w; } int area() { return 2*length*width; } } class Rect extends Poly { public Rect(int l, int w) { super(l,w); } int area() { return length*width; } } class Solution { public static void main(String args[]) { Poly rect1 = new Poly(5,5); Poly rect2 = new Rect(6,4); int area1 = rect1.area(); int area2 = rect2.area(); System.out.println(area1 + " " + area2); } } 30 24 60 48 60 24 25 24 50 48 48 24 50 24

You work in a factory that manufactures balls. One day one of the balls manufactured in a group of eight is slightly heavier than the rest. You have a standard scale with which you can weigh the balls. How would you go about finding the defective ball in the least amount of weighing attempts possible (maximum of 2 attempts).
avatar

Associate Software Engineer

Interviewed at Sunview Software

3.1
Aug 17, 2016

You work in a factory that manufactures balls. One day one of the balls manufactured in a group of eight is slightly heavier than the rest. You have a standard scale with which you can weigh the balls. How would you go about finding the defective ball in the least amount of weighing attempts possible (maximum of 2 attempts).

Viewing 1821 - 1830 interview questions

See Interview Questions for Similar Jobs

Glassdoor has 666,190 interview questions and reports from Software engineer net developer interviews. Prepare for your interview. Get hired. Love your job.