extremejava


Posted an entry on Extreme Java
How to validate time using regular expression in Java
Check if IP address is valid in Java The following program shows how to check if a particular IP address is valid in Java. Java Regular Expressions How to validate URL using regular expression in Java How to validate IP address using regular expression...
2012-04-19 11:42:08

Posted an entry on Extreme Java
How to validate IP address using regular expression in Java
C
heck if IP address is valid in Java The following program shows how to check if a particular IP address is valid in Java. Java Regular Expressions How to validate URL using regular expression in Java

2012-04-19 11:28:28

Posted an entry on Extreme Java
How to connect to MySQL database in Java
Java MySQL database connection tutorial Databases are used to persist the application data. And creating the connection is the first step in any application. The following program shows how to connect to MySQL database in Java: The only requirement for...
2012-04-19 11:16:52

Posted an entry on Extreme Java
How to connect to Oracle database in Java
Java Oracle database connection tutorial Databases are used to persist the application data. And creating the connection is the first step in any application. The following program shows how to connect to oracle database in Java: The only requirement...
2012-04-19 11:10:39

Posted an entry on Extreme Java
JDBC Transactions Tutorial
Java JDBC transactions All kind of databases offer the use of transactions by implementing the SQL specification for savepoint, rollback and commit. If something happens wrong in a Java program then a rollback statement is executed which brings the...
2012-04-18 12:11:59

Posted an entry on Extreme Java
Check if date in a range in Java
Check for date range in Java Checking if a date is in a particular range of date is very common task to be done in Java applications. The following program shows how to check if a particular date falls between start date and end date in Java. Though we...
2012-04-18 12:06:42

Posted an entry on Extreme Java
Java try with resources in example code
Close resource automatically in JDK 7 It is a pain to close resources in the finally block so that any resources like File/Network/Database handles. But JDK 7 has come up with a simple solution to this by initializing these resources as argument of try...
2012-04-18 12:00:07

Posted an entry on Extreme Java
Convert JSON to HashMap in Java
Convert JSON to HashMap JSON has gained a lot of popularity in all kind of applications including desktop, mobile and web applications. The following program shows how to convert JSON data which contains key value pairs into HashMap in Java. You need to...
2012-04-18 11:51:43

Posted an entry on Extreme Java
Convert HashMap to JSON in Java
Convert HashMap to JSON JSON has gained a lot of popularity in all kind of applications including desktop, mobile and web applications. The following program shows how to convert HashMap which contains key value pairs into JSON format. You need to use...
2012-04-18 11:45:33

Posted an entry on Extreme Java
How to get IP address in Java
Get IP address in Java Sometimes Java networking applications need to get the IP address of current machine to perform various tasks. The following program shows how to get the IP address of the computer. The program is independent of the operating...
2012-04-18 11:37:02

Posted an entry on Extreme Java
How to validate URL using regular expression in Java
Regular expression for web URL’s in Java The following program shows how to validate URL in java by using regular expressions. The HTTP and HTTPS urls will pass the above listed validation but any wrong URL will not be able to pass the regex...
2012-04-17 13:33:37

Posted an entry on Extreme Java
How to check if a file is hidden in Java
How to find if file is hidden in Java The following program checks if the given file is hidden or not in Java. As you can see that depending upon the result of if condition, the corresponding message is printed on the console. It is worth mentioning...
2012-04-17 13:27:15

Posted an entry on Extreme Java
How to sort an Array in java
Sort Array in Java in ascending and descending order Arrays by default don’t support sorting in Java but the use of Arrays utility class makes it possible to sort the elements in ascending or descending order in Java. The following program...
2012-04-17 13:21:22

Posted an entry on Extreme Java
How to check JDK version
Check JDK/JRE version being used One can find the java version installed on the machine or in use by using the java tool which is shipped with JDK/JRE. This tool is present inside the bin folder of JDK or JRE. So if you want to check the version of java...
2012-04-17 13:12:00

Posted an entry on Extreme Java
How to create directory in Java
Create Directory in Java Example The following program shows how to create directory in Java. The program doesn’t create the directory if it is already existing. You may be required to change the directory path in the program shown below: Java I/O...
2012-04-17 13:04:56

Posted an entry on Extreme Java
How to read an image in Java
Read Image data using ImageIO in Java The following program shows how to read an image in Java and then use it as an object to pass across methods or JVM. The read method is overloaded in the Image and prints the attribute of image instead of printing...
2012-04-17 12:56:52

Posted an entry on Extreme Java
Generate serialVersionUID in Java
Get serial version UID in Java serial version UID plays an important part in the serialization/de-serialization of objects in Java. This field is used to provide versions to objects so that any changes made to the class and the serialized object can be...
2012-04-17 12:48:31

Posted an entry on Extreme Java
Create manifest and META-INF in jar
Add manifest.mf in JAR manifest.mf file which is present inside META-INF folder of any jar file contains the meta information about the application like main class, build version and creation date etc. There are many ways in which one can add...
2012-04-17 12:40:52

Posted an entry on Extreme Java
Eclipse exits with a splash screen error
Eclipse not starting up Java If eclipse gives you error when starting up and simply closes with a splash screen then there are multiple reasons for this to happen. Usually there is no error message displayed by the Eclipse IDE and somewhere a log is...
2012-04-17 12:37:41

Posted an entry on Extreme Java
Convert XML to properties file
Convert XML to Properties in Java The JDK class Properties provides the API method for converting the contents of an XML file to Properties object . One can also do the same by first reading the XML file using DOM parser and then writing it to...
2012-04-16 11:26:01


 1 2 3 >  Last ›