Q. Can you write code to output the perfect number between a given range? Definition: A perfect number is a positive integer that is equal to the sum of its proper divisors. The smallest perfect number is 6, which is the sum of 1, … Read more ›...
Q. Can you write code to output the perfect number between a given range? Definition: A perfect number is a positive integer that is equal to the sum of its proper divisors. The smallest perfect number is 6, which is the sum of 1, … Read more ›...
Q1. Write a program that prints numbers from 1 to 30, but for multiples of three print “Fizz” instead of the number and for the multiples of five print “Buzz”. For numbers which are multiples of both three and five print “FizzBuzz”? A1. … Read more ›...
Flyweight pattern is about sharing a collection of objects. The flyweight design pattern is a structural pattern used to improve memory usage and performance (i.e. due to shorter and less frequent garbage collections) by creating fewer objects. Instead of creating a large number of objects, we reuse the objects that...
Q1. Can you write Java code to generate random numbers between a given range? A1. E.g. 0 and 9 or 5 to 35, and so on.
|
1 |
Random rand = new Random(); |
The “nextInt()” method works from “0” … Read more ›...
Q. Java does not have a Graph implementation, how would you go about implementing your own? A. Graphs are data structures that represent arbitrary relationships between members of any data sets that can be represented as networks of nodes and edges. A tree structure is essentially a more organized graph...
Q. Java does not have a Graph implementation, how would you go about implementing your own? A. Graphs are data structures that represent arbitrary relationships between members of any data sets that can be represented as networks of nodes and edges. A tree structure is essentially a more organized graph...
Q. If Java did not have a HashMap implementation, how would you go about writing your own one? A. Writing a HashMap is not a trivial task. It is also not a good practice to reinvent the wheel. The interviewer is trying to evaluate your level of technical knowledge and...
Q. What is a first-level cache in Hibernate? A. First-level cache always is associated with a “Session” object. Hibernate uses this cache by default. You can’t turn it off. Hibernate caches the SQL statements like insert, update, delete, etc in the first-level cache. By default, … Read more ›...
In industry specific forums, I often see questions like “what certification do I need to do to become an architect?” The simple answer is that you don’t need a certification to become an architect. It may help, but it takes a lot more to become an architect.
You just can’t only study to become a Java architect.
…
1. Firstly, reflect back on your past experiences and achievements by going through your resume to sell yourself more effectively. “Think of situations where you have”
…
This extends 12 UML Interview Questions & Answers. Q1. How would you go about designing a system as described below? A barn that contains animals such as cows and horses. A farmer milks the cows in the farm, and the animals eat hay that are stored in the barn. …...
Q1. How would you go about.. building an ETL pipeline to handle 3k TPS? A1. Building a data pipeline (i.e. aka ETL) for 3000 TPS (i.e. Transactions per second), which about ~260 million records per day requires distributed, highly scalable, … Read more ›...
This is a very decent coding exercise to sharpen your coding skills. Nicely explained with diagrams and complete code. Q1. What is Huffman coding? A1. Huffman coding is a compression technique used to reduce the number of bits needed to send or store a message. … Read more ›...
I have a good news, I got job offer. I like to share with you from my bottom of my heart feeling thankful to you.