Oracle Interview Question for Senior Software Development Engineers


Country: India
Interview Type: In-Person




Comment hidden because of low score. Click to expand.
0
of 0 vote

for(int i=0;i<4;i++){

for(int j=0;j<2*i+1;j++){
System.out.print("*");
}
System.out.println();
}

- anu pachauri July 03, 2018 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

{for(int i=0;i<4;i++){

for(int j=0;j<2*i+1;j++){
System.out.print("*");
}
System.out.println();
}
}

- anu pachauri July 03, 2018 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

public void printStar(int size)
{
if(size <= 0) {
print("Incorrect size");
return;
}
for(int j=1; j <= size; j++)
{
for(int i=1; i <= j; i++)
{
print("* ");
}
println();
}

- Divya k July 03, 2018 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

for(int i=0; i<5; i++)
	{
		for(j=0; j<2*i+1; j++)
		{
			System.out.println("*");
		}
		System.out.println();
	}

- Anonymous July 05, 2018 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

//using 2 for loops
public class Pattern1 {
	public static void main(String[] args) {
		int size = 11;	//here you can give the size whatever you want
		for(int i = 1; i <= size; i=i+2) {
			for(int j = 1; j <= i; j++) {
				System.out.print("*");
			}
			System.out.println();
		}
		
	}
}

- Bushan SC July 09, 2018 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

for(var i=0; i < 5; i++) {
  var str = "";
	for(var j=0; j < 2*i + 1; j++) {
      		str += "*";
	}
	console.log(str);
}

- shashi.dokania July 12, 2018 | Flag Reply


Add a Comment
Name:

Writing Code? Surround your code with {{{ and }}} to preserve whitespace.

Books

is a comprehensive book on getting a job at a top tech company, while focuses on dev interviews and does this for PMs.

Learn More

Videos

CareerCup's interview videos give you a real-life look at technical interviews. In these unscripted videos, watch how other candidates handle tough questions and how the interviewer thinks about their performance.

Learn More

Resume Review

Most engineers make critical mistakes on their resumes -- we can fix your resume with our custom resume review service. And, we use fellow engineers as our resume reviewers, so you can be sure that we "get" what you're saying.

Learn More

Mock Interviews

Our Mock Interviews will be conducted "in character" just like a real interview, and can focus on whatever topics you want. All our interviewers have worked for Microsoft, Google or Amazon, you know you'll get a true-to-life experience.

Learn More