Java Interview Questions | Glassdoor

Java Interview Questions

6,007

interview questions shared by candidates

Java Interview Questions

Sort: RelevancePopular Date

Given an array of randomly arranged lower case letters, uppercase letters, and numbers, sort the array such that all lower case letters come before all uppercase letters, come before all numbers. The classes of characters do not need to be in order in their respective sections.

7 Answers

Find all duplicate files by content in your filesystem.

7 Answers

Write a C function to define strstr(char *haystack, char * needle) to return the first occurrence of needle in haystack. Code must compile and execute.

7 Answers

1. mutable, non mutable classes in Java 2. declaring constants in Java 3. x^y algorithm and its optimization. 4. second largest number from Binary Tree

7 Answers

Coding Challenge 3) You are given a linkedlist with next and arbitary pointers. Create a new linkedlist similar to the given linkedlist. You need to create a code for deep copy of a linkedlist.

8 Answers

How would you find the pairs of numbers that added to some specific number in an array.

7 Answers

Main Technical Question: Write a function that takes as input an array of words input => ['cat', 'star', 'act', 'god', 'arts', 'dog', 'rats'] and returns a sorted array output => ['cat', 'act', 'god', 'dog', 'start', 'arts', 'rats']

6 Answers

Another question was: what's the difference between an abstract class and an interface. Can a class inherit both from an abstract class and an interface at the same time?

6 Answers

Assume there is a method provided getNextperson() which gives Person objects which have comparable interface implemented, now read from a file records and sort it and give first 1000 records, write code on the paper

7 Answers

Given four coins that could have any value (i.e. $.17, $.07, $.05, $.01), come up with an algorithm that figures out the fewest number of coins to get that value.

6 Answers
4150 of 6,007 Interview Questions