vimal4david / Top50InterviewQuestions

Solutions for top 50 Java interview questions
1 stars 0 forks source link

Top 50 Interview Questions

Solutions for top 50 Java interview questions.

Question 1 (FizzBuzz)

Write a short program that prints each number from 1 to 100 on a new line.For each multiple of 3, print "Fizz" instead of the number.For each multiple of 5, print "Buzz" instead of the number.For numbers which are multiples of both 3 and 5, print "FizzBuzz" instead of the number.

Question 2 (Fibonacci numbers)

Write a program to calculate and print Fibonacci number using both recursion and Iteration.

Question 3 (Reverse a string)

Write a program to reverse a string since there is no utility method in the String class.