Java Programming Tutorials

Java Programming Tutorials And Articles
  Title / Author Reverse Sort Order Replies
Views
Before we understand what Java Serialization is, first we need to understand what serialization means? In computer science, in the context of data storage, serialization is the process of translating data structures or object state into a format that can be stored and reconstructed later in the...
0
1,291
Since JDK version 5.0, a new mechanism was introduced in Java that enables us to include additional information (known as metadata) directly into the java source code. This information is termed as Annotations. In English dictionary, Annotation means “a note by way of explanation or comment added...
0
1,187
People generally have doubt that when we use Hibernate we simply use configuration to create SessionFactory(). Using that we create session for JDBC connection. But all these SessionFactory and Session class are interfaces. But there is no class available with this name which implements methods of...
1
8,292
Drawing Lines The drawLine method belongs to the Graphics class. This example draws a fan of twenty lines from the bottom center of the Applet along the top edge. The applet's getSize method is used to find the dimensions of the applet. import java.awt.*; import java.applet.*; public...
0
11,100
Introduction Have you ever searched for files and folders in Windows operating system? Generally most of the users try to search various .doc files, .pdf files etc. We generally search by giving *.doc or *.pdf in the text box of the search window of the windows OS. Of course windows OS provides...
5
16,686
What is an Abstract Class? A class defined in such a way such that it defines the basic structure of an object but does not provide any implementation details about at least one of its method. Any method in an abstract class which is devoid of any implementation details is called abstract...
3
6,536
One of the prime features of object oriented programming is data encapsulation.This feature enables data to have restricted access.There are currently four different access specifiers in JAVA. Namely, Public Protected Default Private Public:- All the data members and member functions...
3
5,540
All the three keywords final, finally and finalize() plays a very important role in JAVA. Final is a keyword used for declaration of variable which cannot be edited, finally is a segment of code used for code cleanup in case of an exception whereas finalize is a method used for object cleanup...
2
40,544
Introduction Buffers can be very useful in Java since they speed up I/O operations considerably. Basically a buffer is a space allocated in memory for Bytes, Chars, and other data types to be stored. Buffers are really useful while writing Client/ Server applications. Creating a Buffer A...
4
26,810
Java 8 is the major release after the release of Java 5 that significantly improved the Java language. It has introduced many cool new features. One of them is the Default and Static methods in interfaces. This feature has reduced the burden of modifying the implementation classes of existing...
0
1,313
Java Runtime Environment uses classloaders to load classes dynamically into the Virtual Machine for execution. A class is a blueprint or a definition which represents a similar kind of objects. It describes the behavior of the objects of its type. In other words, It can be expressed as a named unit...
0
1,023
Here we go. This example is used to illustrate that “how we can use color class in java?” We several time need to color our panel, label, or form. For this java provide us Color class in awt package i.e “java.awt.Color.java”. This class has seven - number of constructor. But the widely used...
5
16,150
Here, these two codes are used to shows the difference between normal MultiThreading and Synchronized Multithreading. Notice, see the difference in the starting and finishing of all the threads in both the code and try to find why every time when you run the program code, random thread starts...
3
6,797
Today we will discuss Java packages. This is one of the most important features in Java. Java comes with many pre-listed packages. Knowingly or unknowingly, you may have used them in your code. I will explain this later on. Even if you are a beginner you had used Java package. First of all we will...
4
9,799
The problem occurred when i was developing this app was that the connection of the phone with the computer. For this connection to work over the Wifi network the user must enter the correct IP address of the phone/computer. It's a bit of a downfall when it comes to the users side since there can be...
0
3,470
The classical input/output (I/O) library in Java contains classes that support I/O handling of streams with compressed data. You can easily compress and decompress any text or binary data to or from any I/O stream using either a file or any other stream (e.g., a servlet output stream). In this...
0
5,781
The JavaMail API (http://java.sun.com/products/javamail/) is a messaging framework intended to build platform-independent applications that use e-mail messaging. It is included in the J2EE platform and is available as an optional package in J2SE. The API's main purpose is not for transporting,...
0
31,837
-
-
Google pagination used to find initial and final index for the search done using google3 for website application. GoogleAppSearch.java import net.sf.gsaapi.GSAClient; import net.sf.gsaapi.GSAQuery; import net.sf.gsaapi.GSAResponse; import net.sf.gsaapi.GSAQuery.GSAQueryTerm; import...
7
6,628
Introduction How to split a file in to equal parts without knowing the number of records in the input file? Background Suppose you don't know how many records are in a dataset, but you want to divide the records as equal as possible among the output datasets. We can split a file into...
1
8,842