Java Programming Tutorials

Java Programming Tutorials And Articles
  Title / Author Replies
Views
A specific instant in time is represented with millisecond precision by the Date class. Date is interpreted as year, month, day, hour, minute, and second values using this class. But API for functions of this class was not so flexible and hence was not supported at international level. Also for JDK...
0
1,366
Java.util package contains the collections framework, legacy collection classes, event model, date and time facilities, and miscellaneous utility classes. Java.util.ArrayList Class Java.util.Calendar Class Java.util.HashMap Class Java.util.ArrayList Class The java.util.ArrayList class...
0
1,053
Java.lang package contains the classes that are fundamental to the design of the Java programming language. Java.lang.Character Class Java.lang.Float Class Java.lang.Integer Class Java.lang.Character Class The java.lang.Character class wraps a value of the primitive type char in an...
0
1,040
Java.io package provides classes for system input and output through data streams, serialization and the file system. Some of important and popular classes of java.io package are given below: Java.io.BufferedInputStream Class Java.io.BufferedOutputStream Class Java.io.BufferedReader Class...
0
1,121
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,104
JDBC (Java Database Connectivity) is an API (Application Programming Interface) which is used to connect java to any database. It is used to communicate with various types of databases such as Oracle, MS Access, My SQL and SQL Server. It is a platform-independent interface between Java and...
0
707
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
927
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,100
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,174
Objects in Java are referred using reference types, and there is no direct way to copy the contents of an object into a new object. The assignment of one reference to another merely creates another reference to the same object. Therefore, a special clone() method exists for all reference...
8
224,749
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,357
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,589
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,364
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
15,120
Multi-dimensional arrays Java, as with most languages, supports multi-dimensional arrays - 1-dimensional, 2-dimensional, 3-dimensional, ... This discusses 2-dimensional arrays, but the same principles apply to higher dimensions. 2-dimensional arrays 2-dimensional arrays are usually...
37
560,831
Every class has at least one it's own constructor. Constructor creates a instance for the class. Constructor initiates something related to the class's methods. Constructor is the method which name is same to the class. But there are many difference between the method s and the Constructor.In this...
3
26,726
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,376
Here is a simple implementation of client-server using Java. There are two java files, one for client code and one for server code. The code is quite self-explanatory. FactorialClient.java /* ** A TCP based client that will send the number entered by the user for factorial ** ...
3
18,844
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
39,505
An initialization block is a block of code between braces that is executed before the object of the class is created. As the execution of the initialization block is dependent on the creation of the object we can easily make a guess that it has two types of object. 1. Non static initialization...
1
32,126