Java software engineer Interview Questions | Glassdoor.co.in

Java software engineer Interview Questions

6,477

java software engineer interview questions shared by candidates

Top Interview Questions

Sort: RelevancePopular Date

Write a program for odd input the pattern output will as below n=1 *-* n=3 ***** *** *---* *** *****

11 Answers

import java.util.Scanner; public class Pattern{ public static void main(String[] args) { Scanner sc=new Scanner(System.in); int n=sc.nextInt(); for(int i=n;i>=2;i--){ for(int j=1;j<=2*n-(i-1);j++){ System.out.print(" "); } for(int k=1;k<=2*i-1;k++){ System.out.print("*"); } System.out.println(); } for(int i=1;i<=n-1;i++){ System.out.print(" "); } System.out.print("*"); for(int i=1;i<=n;i++){ System.out.print("-"); } System.out.print("*"); System.out.println(); for(int i=2;i<=n;i++){ for(int j=1;j<=n-i;j++){ System.out.print(" "); } for(int k=1;k<=2*i-1;k++){ System.out.print("*"); } System.out.println(); } } }

import java.util.*; class Pattern { public static void main(String arr[]) { Scanner input=new Scanner(System.in); System.out.print("enter the "); int n=input.nextInt(); int p=n; for(int i=1;i=1;j--) { System.out.print("*"); } System.out.print(" "); p--; } for(int k=1;k<=n;k++) { System.out.print("_"); } System.out.print(" "); for(int m=1;m<=n;m++) { for(int l=1;l<=2*m-1;l++) { System.out.print("*"); } System.out.print(" "); } } }

code for c language #include #include int main() { int n=10,i,j,k,l,m,o; for(i=1;i<=n;i++) { for(j=1;j<=n+i;j++) { if(i==n) { for(k=1;k<=n-1;k++) printf(" "); printf("*"); for(m=1;m<=n;m++) printf(" "); // printf("*"); break; } printf(" "); } for(o=1;o<=2*(n-i)+1;o++) printf("*"); printf("\n"); } for(i=1;i

written test on basic java you can crack if you are average concept in java.

10 Answers

take input from user...3,5,7 etc and draw a pattern if input is 3 then *** *** * * *** * * * if input is 5 then ***** ***** * * * * * * ***** * * * * *

9 Answers

The first question was to print pattern that is n=1 *** n=3 * * *** *** ************ *** *** * * n=5 * * *** *** ***** ***** ******************* ***** ***** *** *** * *

10 Answers

1.Implement deadlock in java 2. Features of mongo db 3.Questions related to dynamic programming 4.Implement Encapsulation using java Beans.

8 Answers

Write a program to print the series 4,6,12,18,30,42,60,72

7 Answers

1.Given two words find if they contains the same letters , if one letters occurs multiple times in word then second word also should have the number same number of times. eg: little and title are different, das and sad are equals. 2. Rearrange all the letter of a word in ascending order while removing the duplicate letters. eg:- letter should be printed elrt.

8 Answers

Write a program for input any number the pattern output will as below

7 Answers

useless questions, not even 1 technical question for a technical role. 1st time in my carrier i have seen an Interview without even 1 technical question shot out & i'm wondering how i got rejected if there is not even one technical discussion happened . It's a time pass show. I hold another offer with another leading aerospace organization before diving in for boeing interview for the same developer position which means the skills sets remains same. Please think 100 times before applying for boeing position. It's a waste of 1 months Plus to know the status of the selection.I feel bad to be part of this Muppets show.

6 Answers

Core Java questions & this person was also not aware about the immutability concept properly except what is given on internet. I had to teach him the immutability of class & object, else for this person both are same.

6 Answers
110 of 6,477 Interview Questions