 |
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...
By pradeep
Last Message By javaexp
|
8 216,881 |
 |
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...
By ManzZup
|
0 1,585 |
 |
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...
By manish174
Last Message By annasingh
|
4 7,465 |
 |
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...
By Debasmita
Last Message By icool
|
3 3,357 |
 |
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...
By manish174
Last Message By suresh091221
|
5 9,451 |
 |
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...
By pradeep
Last Message By Healthcare
|
37 541,307 |
 |
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...
By Sanskruti
Last Message By Healthcare
|
3 24,961 |
 |
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...
By Debasmita
Last Message By Healthcare
|
3 4,115 |
 |
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
** ...
By pradeep
Last Message By newindiasolutions
|
3 15,889 |
 |
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...
By Debasmita
Last Message By allentwright
|
2 18,556 |
 |
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...
By shabbir
Last Message By Balaji Reddy
|
1 28,537 |
 |
Introduction
JDBC is a platform-independent interface between relational databases and Java. In today's Java world, JDBC is a standard application programming interface (API) for accessing enterprise data in relational databases (such as Oracle, MySQL, Sybase, and DB2) using Structured Query...
By techgeek.in
Last Message By Balaji Reddy
|
5 7,040 |
 |
Java is an object-oriented language and as said everything in java is an object. But what about the primitives? They are sort of left out in the world of objects, that is, they cannot participate in the object activities, such as being returned from a method as an object, and being added to a...
By techgeek.in
Last Message By Balaji Reddy
|
13 102,798 |
 |
We can create a thread in Java by extending Thread Class. A better way to create a thread in Java is to implement Runnable interface. A thread can be created by extending Java Thread class also. Now the question arises why implementing Runnable interface is a better approach? Answer is, if the...
By Sanskruti
Last Message By prabhas4
|
4 144,306 |
 |
Java's networking classes enable you to implement applications that communicate across a network/remote connection, but the platform also extends into the realm of the Internet and URLs. Java's URL class makes accessing Web resources as easy as accessing a local file. Let's take a look at how you...
By pradeep
Last Message By fiverivers
|
13 58,413 |
 |
Introduction
Java can be used to create two types of programs: applications and applets. An application is a program that runs on a computer, under the operating system of that Computer just like the one created using C or C++.
An applet is an application that is accessed on the...
By techgeek.in
Last Message By suman52
|
7 6,611 |
 |
Introduction
A package is a namespace that organizes a set of related classes and interfaces to provide access protection and namespace management.You can think of packages as being similar to different folders on your computer. Software written in the Java programming language can be...
By techgeek.in
Last Message By herandez21
|
9 8,912 |
 |
In the first part I discussed about applet fundamentals as to what is an applet, its features, various methods of Applet class and a simple example on applet. In this article I will discuss further on advanced features of applet.
Applet class
Applet class provides all necessary support for...
By techgeek.in
Last Message By TPrice
|
2 6,295 |
 |
I often hear people asking on how to put an image on Java applications, thus here is an example of a painted panel that has an image in the same directory as the application *note* you cant use windows bmp with Java, but once you start creating your own images it's a good time to note that their...
By Systemerror
Last Message By tiwvinay
|
14 25,539 |
 |
The String class is used to manipulate character strings that cannot be changed. In simple terms, objects of type String are read only and immutable. The StringBuffer class is used to represent characters that can be modified. The significant performance difference between these two classes is that...
By techexplorer
Last Message By andrewgibs
|
6 5,427 |