Categories
Software development Technology

Java thread and interview questions

Reading Time: 2 minutes

(Update 3 10-28-2020) Link to JoelOnSoftware

(Update 2  10-27-2020)

Java
1) What is the difference between and interface and an abstract class(pre Java 8)?
2) Name a design pattern you have used (or would like to use)?
3) How would you implement the Singleton Design Pattern?
4) Since Java 8, what is the preferred way to avoid an NPE?
5) What goes on the heap and what goes on the stack? What can you tell me about the Garbage Collector in java? Can you have memory leaks in java?

API development
1) Difference between SOAP and REST
2) Difference between REST and RESTful
3) What are the best practices that are to be followed while designing RESTful web services?
4) Some of the methods (verbs) in REST: 1) GET, POST, PUT, DELETE; 2) Is Post idempotent?
5) Describe some of the API management tools you used, for example, Swagger, Apigee etc?

Microservices Cloud environment (Azure, AWS or GCP)
1) What are some features of a Microservices architecture?
2) What is 12 factor application? List some of the factors and explain them.
3) What cloud providers did you use? What are their strength and weakness? Or some pain points?
4) What are some of the frameworks and tools you used for micro-services development?
5) How do you monitor the apps? Do you have any recommendations or best practice for logging and tracing?

Some devops and automation experience as well (i.e. Docker, Kubernetes)
1) Where did you deploy the micro-services you or your team developed? Or what is your deployment environment? Is it IAAS (infrastructure as a service), or PAAS (platform as a service)?
2) How do you deploy apps to the dev, test and production environment? Did you use any CI / CD tools?
3) What are the main steps in a pipeline build / deployment?
4) Have you done any automated testing / validation?
5) For cloud infrastructure build out, do you use the console (UI), command line or some kind of source code (yaml etc) as well as tools such as Terraform?

(Update 09-01-2020) Java 8

(baeldung) Introduction to Java 8 Streams

Lambda Expressions and Functional Interfaces: Tips and Best Practices

New Features in Java 8

GitHub (eugenp) :

Core Java 8

Core Java 8 (part 2)

Also:

Java 8 Features with Examples

Prominent Java 8 Features With Code Examples

(Update 05-19-2020) There are a lot of online code playground or white boarding tools for code testing on the spot.

(Original ) Hibernate map one to many (Vlad Mihalcea)

A collection of the posts I saw recently.

Java World
Introduction to Java threads

Java 101: Understanding Java threads, Part 1: Introducing threads and runnables

Others
Java Callable Future Example

Java – Multithreading

Java Thread Tutorial: Creating Threads and Multithreading in Java

Vaadin chat example
It needs multi session (thread) support when we need to use tabs to chat back and forth. The app description is here.

The annotation to support this: @VaadinSessionScope

Java interview questions
Placeholder: I still need to clean up the list below (to incorporate my recent interview experience).

aop
dependency injection
refactor
agile
test driven
code review (what to look)
static vs. final
interface
spring
hibernate

java generics

tree set vs hash set

tree map vs linked hash map
https://dzone.com/articles/hashmap-vs-treemap-vs

.equals() vs ==

Java String equals()

Elasticsearch 

Digitalocean installation

Get started