extremejava


Posted an entry on Extreme Java
Create a new file in Java
How to create a file in Java program The Java IO API allows one to create file or directory in the filesystem. The File class has the createNewFile method which creates a file if it doesn’t exist. The method createNewFile() returns a boolean value...
2012-04-11 12:03:07

Posted an entry on Extreme Java
console.readLine() and NullPointerException
Getting NullPointerException with System.console() If you use the following code in your application and run it using IDE like Eclipse, you will get NullPointerException but will work fine when starting the application from command line. This is what...
2012-04-11 11:44:48

Posted an entry on Extreme Java
Get user input Console Scanner InputStreamReader
How to read user input from console User inputs from the console involves getting a string input and then processing it. The user may enter a number, letter or special character. There are multiple ways in which one can read input from console. These...
2012-04-11 09:53:26

Posted an entry on Extreme Java
Solution of java.lang.OutOfMemoryError
How to fix OutOfMemoryError When a Java application is being executed then it starts consuming memory and if the memory consumption exceeds a certain amount then you get a OutOfMemoryError which can’t be recovered from. Though it is true that we...
2012-04-10 13:10:06

Posted an entry on Extreme Java
Java TreeMap Tutorial TreeMap in Java
How TreeMap works in Java TreeMap is a type of map which stores data in the form of key value pairs. The feature provided by TreeMap is that the elements inside the TreeMap object are sorted by using the keys. The sorting of key value pairs is done by...
2012-04-10 11:55:25

Posted an entry on Extreme Java
How to check File Permission in Java with Example
Get File Permissions in Java In this Java IO tutorial for working with files, we shall see how to check if the currently logged in user has permissions for read write and execute on a particular file or directory. How to check file read permissions How...
2012-04-01 10:12:47

Posted an entry on Extreme Java
How to enable or disable Assertion in Java
Enable/Disable Assertions Assertions in Java can be enabled and disabled by adding some options while running the Java applications. As you may be aware that assertions are used for making sure that the invariants hold true or not. If the invariant is...
2012-04-01 08:41:38

Posted an entry on Extreme Java
Tomcat and java.lang.OutOfMemoryError: PermGen Cause and Solution
How to resolve OutOfMemoryError in Tomcat When the Tomcat server is started then it needs memory for executing the server program. There are configuration options available with Tomcat and other Java EE servers by using which one can specify custom...
2012-04-01 03:19:10

Posted an entry on Extreme Java
JDBC Driver Types
What are the various JDBC Driver Types Java Database Connectivity (JDBC) is very old topic but is still very widely used in Java applications. The frameworks like Spring, Hibernate and EJB specification require one to specify the driver to be used for...
2012-04-01 01:16:32

Posted an entry on Extreme Java
Convert Java classes to executable .EXE
How to convert Jar to exe There are multiple tools available for use which can convert the java classes packages in a Jar file into an exe file which can be installed on Windows operating system. The list of tools by using which one can convert Java...
2012-03-31 12:22:45

Posted an entry on Extreme Java
Java StringTokenizer example
How to use StringTokenizer in Java StringTokenizer class is used to tokenize the string objects into small portions. The output of StringTokenizer class is same as the split() method of String class. But the difference between split() method and...
2012-03-31 09:28:01

Posted an entry on Extreme Java
How to Sort Arraylist in Java
How to sort ArrayList in Java Sorting an arraylist of String objects is very common task to be done in any kind of application developed using Java. The following code will show you how to sort ArrayList objects based on the natural ordering of String...
2012-03-31 09:14:59

Posted an entry on Extreme Java
Application Server Vs Web Server
Web Server vs Application Server 1) The purpose of web server is to process HTTP requests and return the HTML response back to the client. The result of requests served by web server is usually HTML, XML, JSON, Text or Binary. 2) Web server usually...
2012-03-31 08:05:03

Posted an entry on Extreme Java
Read Parse XML in Java using parser DOM SAX
How to read XML in Java Reading and Parsing XML is a very common task to be performed in Java applications be it Web , Desktop or Mobile. In this Java tutorial, we will see how to read xml file in Java by using the API provided by JDK. There are...
2012-03-31 07:33:28

Posted an entry on Extreme Java
Constructor Recursion in Java
How Recursion works with Constructors in Java One constructor can invoke another constructor by using the this keyword. The very first line of any constructor is either a call to the constructor in the same class or to the one present in the super class.
2012-03-30 04:24:30

Posted an entry on Extreme Java
Java Performance Tuning Tips
How to increase performance of Java applications Here I am listing 7 very common best practices for performance tuning of Java applications. If properly implemented, one can definitely see some improvement in the efficiency. The list is not exhaustive...
2012-03-28 12:16:36

Posted an entry on Extreme Java
How to Disable Browser Back Button
Disabling the back button Back button is an issue most of web applications and there are numerous techniques to avoid the clicking the back button by the user. The primary purpose of avoiding the click of back button is the fact that there are many...
2012-03-28 06:11:35

Posted an entry on Extreme Java
What is final in Java? Final variable , Method and Class
final keyword in Java final keyword in Java has a special meaning in different aspects of a program. The final keyword can be applied to member variables, member methods and classes. The meaning is different in different contexts. 1) When the final...
2012-03-27 12:44:24

Posted an entry on Extreme Java
Difference between ServletConfig and ServletContext
Difference between ServletConfig and ServletContext Servlet needs to be provided initialization parameters by providing some initialization information in web.xml. This includes any configuration parameters and global values for various parameters...
2012-03-25 13:19:51

Posted an entry on Extreme Java
Auto Refresh in Servlets Web Applications
How to perform Auto Refresh There are many requirements in web applications, where in we need to perform the automatic refresh of web pages after some interval. This feature is most required for applications in Sports category where the scorecard needs...
2012-03-22 11:21:18


‹ First  < 1 2 3 4 5 >  Last ›