In today’s tutorial we are going to talk about java reflection constructor mechanisms. We are going to show you how to get a list of constructors by calling getConstructors() and getDeclaredConstructors() methods of the java.lang.Class. Take a ...
Here is a simple solution for generating custom manifest file while building a maven project. Look at our sample pom.xml file:
pom.xml
This configuration points to the custom MANIFEST.MF file. Here is the file
src/main/resources/custom/MANIFEST.MF
Af...
Today’s post is on how to exchange data between activities using Android Intent putExtra and getExtras methods called in an activity code. We are going to show you how to send objects of your own type and read them in an activity. Our example is base...
Here are code snippets that let your application play video files. The first code plays a video from URL or SD card.
Android play video from URL or SD card
Check out supported video formats at http://developer.android.com/guide/appendix/media-formats...
Java HashMap is a very useful collection. You can store any object under specific key using Java HashMap. In this example we are going to store String values. Our HashMap will store itcuties girls names as a keys, and under each key a comma separated...
In this tutorial we are going to setup maven 3 eclipse plugin quickly and smoothly. The whole process goes well under Eclipse Indigo IDE.
1. Maven plugin installation
• Start Eclipse
• Navigate to http://www.eclipse.org/m2e/download
• Grab icon a...
SQL ORDER BY clause defines order of the rows that were pointed in the SELECT clause.
The syntax is:
Just remember we use SQL ORDER BY clause to order result-set by column or columns specified from left to right and if you forget to use ASC or DESC a...
In this tutorial we are going to code a WebService based on Axis2 java2wsdl approach – exposing POJO as a WebService. If you haven’t do so yet configure your development environment based on Eclipse IDE. You might find those two tutorials very helpfu...
Today we are going to show you how to start a script and read its output in a Java program. We are going to run a windows batch file in our example but you can run a script from Linux or any UNIX system with this code as well.
test.bat
Our sample scr...
To use java regular expression you need to be familiar with java.util.regex.Pattern and java.util.regex.Matcher classes. Here is a short code on how to check if an IP address is valid.
This code gives the following output:
At the beginning a regular ...
priya Wrapper Classes are Classes that have written to make objects from the primitive types in Java. They are used to wrap the primitive values in... – Wrapper Classes in Java
Priya Method overloading is not possible by changing the return type of the method because there may occur ambiguity. your site content are really awesome ,... – Overloading and Overriding in Java