Java

Java ThreadLocal Example — step-by-step Programming tutorial on Progressive Robot

Java ThreadLocal Example

URL: https://www.progressiverobot.com/java-threadlocal-example/ Java ThreadLocal is used to create thread local variables. We know that all threads of an Object share it's variables, so the variable is not thread safe. We can use synchronization for thread safety but if we want to avoid synchronization, we can use ThreadLocal variables. Java ThreadLocal ![ThreadLocal, Java ThreadLocal](images/java-threadlocal-example-section-1.png) Every thread […]

Read more
JDBC Tutorial — step-by-step Programming tutorial on Progressive Robot

JDBC Tutorial

URL: https://www.progressiverobot.com/jdbc-tutorial/ Welcome to JDBC tutorial. Java DataBase Connectivity (JDBC) is one of the most widely used API in enterprise applications. This is because most of the applications use some sort of database connectivity. I have recently posted a lot of JDBC tutorials related to basic JDBC, DataSource and it's integration with Spring Framework. JDBC […]

Read more
log4j.properties File Example — step-by-step Programming tutorial on Progressive Robot

log4j.properties File Example

URL: https://www.progressiverobot.com/log4j-properties-file-example/ In [log4j tutorial](/community/tutorials/log4j-tutorial), we saw how to use log4j xml based configuration. But log4j.xml is verbose, so log4j framework provide option to read configuration from properties file too. Since properties file don't have any defined schema to validate, we have to be more careful with it. Today we will see how XML configurations […]

Read more
Relational Operators in Java — step-by-step Programming tutorial on Progressive Robot

Relational Operators in Java

URL: https://www.progressiverobot.com/relational-operators-in-java/ Relational Operators in Java are used to comparing two variables for equality, non-equality, greater than, less than, etc. Java relational operator always returns a boolean value – true or false. Relational Operators in Java Java has 6 relational operators. \== is the equality operator. This returns true if both the operands are referring […]

Read more
static keyword in java — step-by-step Programming tutorial on Progressive Robot

static keyword in java

URL: https://www.progressiverobot.com/static-keyword-in-java/ static keyword in Java is used a lot in java programming. Java static keyword is used to create a Class level variable in java. static variables and methods are part of the class, not the instances of the class. static keyword in java ![java static, static keyword in java](images/static-keyword-in-java-section-1.png) Java static keyword can […]

Read more
Tomcat DataSource JNDI Example in Java — step-by-step Programming tutorial on Progressive Robot

Tomcat DataSource JNDI Example in Java

URL: https://www.progressiverobot.com/tomcat-datasource-jndi-example-java/ Welcome to Tomcat DataSource JNDI Example Tutorial. We looked at the [JDBC DataSource](/community/tutorials/java-datasource-jdbc-datasource-example "JDBC DataSource Example – Oracle, MySQL and Apache DBCP Tutorial") in the last tutorial and learned how to use that in standalone java application. Tomcat DataSource JNDI ![tomcat datasource, jndi example, tomcat jndi, jndi tutorial](images/tomcat-datasource-jndi-example-java-section-1.png) Actual benefit of DataSource comes […]

Read more
Builder Design Pattern in Java — step-by-step Programming tutorial on Progressive Robot

Builder Design Pattern in Java

Today we will look into Builder pattern in java. Builder design pattern is a creational design pattern like [Factory Pattern](/community/tutorials/factory-design-pattern-in-java "Factory Design Pattern in Java") and [Abstract Factory Pattern](/community/tutorials/abstract-factory-design-pattern-in-java "Abstract Factory Design Pattern in Java"). Builder Design Pattern ![builder pattern in java, builder design pattern, builder pattern](images/builder-design-pattern-in-java-section-1.png) Builder pattern was introduced to solve some of […]

Read more
ConcurrentHashMap in Java — step-by-step Programming tutorial on Progressive Robot

ConcurrentHashMap in Java

If you are a Java Developer, I am sure that you must be aware of ConcurrentModificationException that comes when you want to modify the Collection object while using iterator to go through with all its element.

Read more
Exception Handling in Java — step-by-step Programming tutorial on Progressive Robot

Exception Handling in Java

Introduction An _exception_ is an error event that can happen during the execution of a program and disrupts its normal flow. Java provides a robust and object-oriented way to handle exception scenarios known as Java Exception Handling. Exceptions in Java can arise from different kinds of situations such as wrong data entered by the user, […]

Read more
CHAT