Blog Archives
1 6 7 8 9 10 11 12 13 14 15

Configuring JMS with Java Config for sending & receiving messages

Step 1: The bare-bone Spring Java configuration

Step 2: How to connect? Configuring the “ConnectionFactory”.

Step 3: What destination to use? Configure the destination. E.g. Topic

Step 4: The JMsTemplate that uses both the “ConnectionFactory” … 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


Convert Java Date/Time to String & String back to Date/Time

#1. Why convert a Date to String & a String back to Date

(a) Convert a String input from say a file date, so that you can perform operations like

1) Adding 5 days to the date.
2) Comparing a date like before,

Read more ›



Converting String to Amount and Amount to String

#1. Does Java have a “Money” class? No. This will change in Java 9 with the “Money API”. JSR 354 defines a new Java API for working with Money and Currencies. #2. What are the 2 potential pitfalls in working with money? … 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


Core Java Modifiers, Generics, and Annotations: differences

This post is for quick brush-up. These Q&A are discussed in detailed elsewhere in posts like Java modifiers interview Q&A | Java generics interview Q&A | Java annotations interview Q&A Q1. What are the differences among final, finally, and finalize? … 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


Differences between Spring XML and Spring JavaConfig (@Configuration)

This is a good candidate to make it to the job interview discussions along the debate of checked Vs unchecked exceptions as the industry is split on this very topic. Some favor XML, whilst others love using the JavaConfig. Q1. What are the Pros and Cons of Spring JavaConfig Vs....

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


Event Driven Programming in Java – Part 1

Event Driven Architecture aka EDA loosely couples event producers and event consumers. An event can be defined as “a change in state”. For example, when an event producer fires an event to notify all its registered listeners that either “securities” or “security prices” have been loaded, … 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


Event Driven Programming in Java – Part 2

This extends the basic tutorial on event driven programming in Java. This tutorial covers JMX enabling the EventHub class vian MBeans and monitoring through JMX compliant tool like jconsole. Step 1: Define the interface with the methods that are intractable via the JMX compliant client like jconsole. … 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


Event sourcing & CQRS interview Q&As

Most feasible way to handle consistency across microservices is via eventual consistency. This model doesn’t enforce distributed ACID transactions across microservices. Event sourcing is an event-centric approach to business logic design and persistence. It favours to use some mechanisms of ensuring that the system would be eventually consistent at some...

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


Fibonacci number with caching and Java 8 FP

Complimenting Fibonacci number coding – iterative and recursive approach, we can improve performance by caching. If you run this

Output

and you can see “fibonacci(3)” is repeated 2 times, “fibonacci(2)” is repeated 3 times, and so on. If you pick a larger number like 21, … 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


Generating a UUID (aka GUID) in Java

UUID stands for Universally Unique ID. A UUID is known in the Microsoft world as as a GUID.

What does a UUID look like?

The UUID is not a string, but a 128-bit value. The UUID is a hexadecimal value like

How to generate a UUID in Java?

Read more ›



How to perform impact analysis across Java based applications?

Performing impact analysis is a crucial software development task. It is all about calculating the impact of software change.

Q1. What is an impact analysis? Is it a trivial task?
A1. An impact analysis is about being able to tell which pieces of code,

Read more ›



How to write internationalized Java applications?

This post answers questions like — How to write internationalized Java applications? What do you understand by the terms internationalization (i18n) and localization (l10n) relating to Java programming? What is a ResourceBundle?

Localization (aka i10n, where 10 is the number of letters between the letter ‘i’ and the letter ‘n’ in the word localization ) refers to the adaptation of an application or a component to meet the language,

Read more ›



Java 7 fork and join tutorial with a diagram and an example

Q. How does java.util.concurrent.RecursiveTask work? A. It uses a single ForkJoin pool to execute tasks in parallel for both computing sum of numbers recursively and chunking (or breaking) them into chunks of say 3 or less as per the following example. … 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


1 6 7 8 9 10 11 12 13 14 15

300+ Java Interview FAQs

Tutorials on Java & Big Data