Software Engineer Java Developer Interview Questions

4,184 software engineer java developer interview questions shared by candidates

Online screen sharing interview questions Q) Remove html tags in a string Sample Input: <h1>Hello World!</h1> <p>something</p> Output: Hello World! something My Solution: public static String stripHtmlTags(String html){ html = html.replaceAll("<.*?>", " ");//replace tag with space html = html.replaceAll(" +", " ");//replace multi-spaces with a single space return html; } Q) Given an integer input array A, you need to create an integer output array B of same size such that each entry at index i, is stated as B[i] = A[0]*A[1]*....A[i-1]*A[i+1]*A[i+2]*.... So, it means we have to multiply all the numbers excluding the value at that index i. Sample Input: {3,1,6,4} Output: [24, 72, 12, 18] B[0] = 1*6*4, B[1] = 3*6*4, B[2] = 3*1*4, B[3] = 3*1*6 My Solution: /** * Assumptions: zero is not present in the numbers. * @param input int numbers * @return output int array */ public static int[] product(int[] input){ int prod = 1; int[] res = new int[input.length]; for(int ele:input) { prod *= ele; } for(int ind=0; ind<res.length; ind++) { res[ind] = prod/input[ind]; } return res; }
avatar

Java Software Engineer

Interviewed at Wallet Hub

4.2
Jun 30, 2017

Online screen sharing interview questions Q) Remove html tags in a string Sample Input: <h1>Hello World!</h1> <p>something</p> Output: Hello World! something My Solution: public static String stripHtmlTags(String html){ html = html.replaceAll("<.*?>", " ");//replace tag with space html = html.replaceAll(" +", " ");//replace multi-spaces with a single space return html; } Q) Given an integer input array A, you need to create an integer output array B of same size such that each entry at index i, is stated as B[i] = A[0]*A[1]*....A[i-1]*A[i+1]*A[i+2]*.... So, it means we have to multiply all the numbers excluding the value at that index i. Sample Input: {3,1,6,4} Output: [24, 72, 12, 18] B[0] = 1*6*4, B[1] = 3*6*4, B[2] = 3*1*4, B[3] = 3*1*6 My Solution: /** * Assumptions: zero is not present in the numbers. * @param input int numbers * @return output int array */ public static int[] product(int[] input){ int prod = 1; int[] res = new int[input.length]; for(int ele:input) { prod *= ele; } for(int ind=0; ind<res.length; ind++) { res[ind] = prod/input[ind]; } return res; }

Programming Round: 1) Write a program count 1 to 50 number. Every multiple of 3 it should print " Manhattan " and Every 5 multiple it should print " Associate " and combination of 3 and 5 multiple. it should print "Manhattan Associate". 2) How to create class for Smartphone feature using oops concept. Databse: They Given Three table : shellar name,Customer,order: 1) find out all shellarename who ever purches Maruti car. 2) find out all shellername who ever purches Honda and indika car.
avatar

Software Engineer On Java Technologies Having I Yr Experiance

Interviewed at Manhattan Associates

3.8
Feb 13, 2016

Programming Round: 1) Write a program count 1 to 50 number. Every multiple of 3 it should print " Manhattan " and Every 5 multiple it should print " Associate " and combination of 3 and 5 multiple. it should print "Manhattan Associate". 2) How to create class for Smartphone feature using oops concept. Databse: They Given Three table : shellar name,Customer,order: 1) find out all shellarename who ever purches Maruti car. 2) find out all shellername who ever purches Honda and indika car.

Viewing 11 - 20 interview questions

Glassdoor has 4,184 interview questions and reports from Software engineer java developer interviews. Prepare for your interview. Get hired. Love your job.