## Java Interview Questions

- 0of 0 votes
*

* *

* * *

* * * * write a program in java??

- 0of 0 votes
Design a shopping cart.

- 0of 0 votes
Normally where singleton design pattern used in a project?

- 0of 0 votes
what is low level design and high level design in realtime java?

- 0of 0 votes
what are the top 10 coding standards/code reviews in java?

- 0of 0 votes
Spring following by default singleton scope..so if we are using clone() is there anything happend?if anyone knows please tell me the answer

- 0of 0 votes
How to find non- common elements between two string arrays. Eg: String a[]={"a","b","c","d"};

String b[]={"b","c"};

O/p should be a,d

- 0of 0 votes
Java runs on a "virtual" stack machine inside JVM, which has instruction of size of one byte (called byte-codes). How many instructions/bytecodes potentially can such a machine have?

PICK ONE OF THE CHOICES

256

Unlimited

2^32 for 32-bit machines

Depends on JVM version

- 0of 0 votes
[Phone screen]

Tell me about the Java Collections framework, what are its main interfaces. OK, what are the main differences between the Set and List interfaces? What do you give up if you go from a List to a Set, and what do you get in exchange for this if you go from a List to a Set? How would you go about guessing the order of an iteration() of HashSet if I told you I was going to insert the strings "first", "second", "third", "forth", and "fifth"?

- 0of 0 votes
Tell me about the Java Collections framework, what are its main interfaces. OK, what are the main differences between the Set and List interfaces? What do you give up if you go from a List to a Set, and what do you get in exchange for this if you go from a List to a Set? How would you go about guessing the order of an iteration() of HashSet if I told you I was going to insert the strings "first", "second", "third", "forth", and "fifth"?

- 0of 0 votes
[Phone screen]

Tell me what you know about the java.lang.Object class. OK, what are best practices for the equals method? How would you implement an equals method for a class with 100s of data fields?

- 0of 0 votes
Write a Program to find out Whether a given String can be a Palindrome i.e. we need to see for the palindrome after rearranging the words in that string.

example: lets say we have a string "aabbccd" so it can be a palindrome after rearranging the words "abcdcba".

For this I need to find out the optimal solution.

- 0of 0 votes
Write a Program to find out that a given String can be a Palindrome.we need to see for the palindrome after rearranging the words in that string.

example: lets say we have a string "aabbccd" so it can be a palindrome after rearranging the words "abcdcba".

For this I need to find out the optimal solution.

- 0of 0 votes
Design a system like friend's functionality in facebook. should have all features of facebook's friends functionality. like for each person , he can have any number of friends , he will get suggestions for new firends , showing common friends if we visits any other profile . algo should be scalable , robust .

- 0of 0 votes
what is the difference between internal repository and internet repository?

- 0of 0 votes
what about your project performance...how can i answer this question?

- 0of 0 votes
How to convert http to https in java....can anyone knows please tell me?

- 2of 2 votes
Given a String with print all the possible combinations of the all the characters in the string as a string for Example

"abc" is the input the you should print the below:

abc

ab

ac

a

bc

b

c

There is one invisible string which is actually a blank string.

- 0of 0 votes
Given a string that contains exactly a single pair of parenthesis, return parenthesis and their contents, so "xyz(abc)123" yields "(abc)". etc.

Condition: You are not allowed to use a variable anywhere, Regex is not allowed.

- 0of 0 votes
Given a string that contains exactly a single pair of parenthesis, return parenthesis and their contents, so "xyz(abc)123" yields "(abc)". etc.

Condition: You are not allowed to use a variable anywhere.

- 0of 0 votes
Write a java program for Fibonacci series...in this format

{1, 1, 2, 3, 5, 8, 13, 21, 34, 55,}print {1,1,#,3,5,#,13,21,#,55}instead of even numbers print #..how to solve this question

- 0of 0 votes
String="welcome bangalore" i want erolagnab welcome how to reverse this string..can anyone knows pls answer this one.

- 0of 0 votes
int[] a1={1,3,5,7} int[] a2={3,6,8,9} int[] a3={}...

Merge first two arrays in a sorted order result put it in third array output will be{1,3,3,5,7,8} write a code for this one?

- 0of 0 votes
write a java program consider a text file,that file is having N number of lines.how to print last N lines..

- 0of 0 votes
string[][] names={{"perk","parker"},{"jhon","raj"},{"ram","lakshman"}};

write a java program print lastname,then firstname in sorted order without using string.compareTo,collections.sort,arrays.sort

- 0of 0 votes
Lakshmi is a primary school teacher. She wants to give some laddus to the children in her class. All the students sit in a line and each of them has a rating score according to his or her usual performance. Lakshmi wants to give at least 1 laddu for each child. Children get jealous of their immediate neighbors, so if two children sit next to each other then the one with the higher rating must get more laddus. Lakshmi wants to save money, so she wants to minimize the total number of laddus.

Tip: Please understand the question clearly and pay good attention to below provide - sample input and output - completely in order to arrive at correct solution.

Input

The first line of the input is an integer N, the number of children in Lakshmi's class. Each of the following N lines contains an integer indicates the rating of each child.

Ouput

Output a single line containing the minimum number of laddus Lakshmi must give.

Explanation

Sample Input

3

1

2

2

Sample Ouput

4

Explanation

The number of laddus Lakshmi must give are 1, 2 and 1.

- 0of 0 votes
Base class is given you need to stop exposing the base class methods without touching the base class at all.

- -1of 1 vote
The boggle game - given a 2d array of characters

- 0of 0 votes
Evaluate a given mathematical expression, taking into consideration the BODMAS rule. The expression contains no brackets.

- 0of 0 votes
Serialize and deserialize a tree.

Given a tree - not necessarily a binary tree - the serialize method should create a string for the tree. The deserialize method should be able to reproduce the same tree using the string derived from the serialize method.

Basically, serialize() takes in a tree and returns a string, deserialize() takes in a string and returns the tree.