Blog Archives
1 18 19 20 21 22 23 24 25 26 28

Fizz Buzz

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 ›...

This content is for 100-Day-Full-Access, 200-Day-Full-Access, 365-Day-Full-Access, and 2-Year-Full-Access members only. Register 50+ Free Java FAQs 50+ Free Big Data FAQs
Already a member? Log in here


Flyweight design pattern to improve memory usage & performance

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...

This content is for 100-Day-Full-Access, 200-Day-Full-Access, 365-Day-Full-Access, and 2-Year-Full-Access members only. Register 50+ Free Java FAQs 50+ Free Big Data FAQs
Already a member? Log in here


Generating random numbers in Java

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.

The “nextInt()” method works from “0” … Read more ›...

This content is for 100-Day-Full-Access, 200-Day-Full-Access, 365-Day-Full-Access, and 2-Year-Full-Access members only. Register 50+ Free Java FAQs 50+ Free Big Data FAQs
Already a member? Log in here


Graph from scratch Java example

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...

This content is for 100-Day-Full-Access, 200-Day-Full-Access, 365-Day-Full-Access, and 2-Year-Full-Access members only. Register 50+ Free Java FAQs 50+ Free Big Data FAQs
Already a member? Log in here


Graph from scratch Java example adjacent matrix approach

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...

This content is for 100-Day-Full-Access, 200-Day-Full-Access, 365-Day-Full-Access, and 2-Year-Full-Access members only. Register 50+ Free Java FAQs 50+ Free Big Data FAQs
Already a member? Log in here


HashMap from scratch Java example

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...

This content is for 100-Day-Full-Access, 200-Day-Full-Access, 365-Day-Full-Access, and 2-Year-Full-Access members only. Register 50+ Free Java FAQs 50+ Free Big Data FAQs
Already a member? Log in here


Hibernate First & second level cache interview Q&As

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 ›...

This content is for 100-Day-Full-Access, 200-Day-Full-Access, 365-Day-Full-Access, and 2-Year-Full-Access members only. Register 50+ Free Java FAQs 50+ Free Big Data FAQs
Already a member? Log in here


How to become a Java architect?

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.

Read more ›



How to prepare to succeed in Java job interviews?

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”

  • fixed issues relating to performance, security holes, memory leaks and concurrency mgmt.

Read more ›



How would you go about designing with UML diagrams

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. …...

This content is for 100-Day-Full-Access, 200-Day-Full-Access, 365-Day-Full-Access, and 2-Year-Full-Access members only. Register 50+ Free Java FAQs 50+ Free Big Data FAQs
Already a member? Log in here


How would you go about.. building an ETL pipeline to handle 3k TPS (i.e transactions per second)

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 content is for 100-Day-Full-Access, 200-Day-Full-Access, 365-Day-Full-Access, and 2-Year-Full-Access members only. Register 50+ Free Java FAQs 50+ Free Big Data FAQs
Already a member? Log in here


Huffman coding in Java

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 ›...

This content is for 100-Day-Full-Access, 200-Day-Full-Access, 365-Day-Full-Access, and 2-Year-Full-Access members only. Register 50+ Free Java FAQs 50+ Free Big Data FAQs
Already a member? Log in here


Integration Unit testing Spring Transaction Management

This is an integration testing that tests Spring transaction through service, and DAO layers all the way up to the embedded database like HSQLDB or H2. After commit or rollback, the number of records in the table are verified. The service layer defines the transactional boundaries with the “@Transactional” annotation....

This content is for 100-Day-Full-Access, 200-Day-Full-Access, 365-Day-Full-Access, and 2-Year-Full-Access members only. Register 50+ Free Java FAQs 50+ Free Big Data FAQs
Already a member? Log in here


1 18 19 20 21 22 23 24 25 26 28

300+ Java Interview FAQs

Tutorials on Java & Big Data