Some of the System Properties of Java
If we want to programmatically determine what version of the Java Runtime Environment (JRE) is being used to execute a given application then, we can… Read More »Some of the System Properties of Java
Start
If we want to programmatically determine what version of the Java Runtime Environment (JRE) is being used to execute a given application then, we can… Read More »Some of the System Properties of Java
First of all if you have already java then uninstall that java and download Java Sdk from Sun Microsystem :
For download: jdk (Java Development Kit)
Then choose your appropriate Operation System and download and Install the *.EXE program
This is one of the tough point for beginner to install java Beginner.
Some of the steps to maintain Path of Java compiler are given as follows:
STEP 1: Right click on My Computer and Go properties.
STEP 2: Dialogue Box Appears (given in fig 1.1) Go to Advance Tab > Environment Variables..
STEP 3: Now in New Dialogue box (given in fig.1.2 ) You can click on New Tab for creating new variableRead More »Java Software Development Kit Installation (Windows)
As we know that java is made by the C programming. The java has many common features to C language. While we wants to print in java we usually use the following code.
1 2 3 |
System.out.println(<em>statement1</em>); or System.out.print(<em>statement2</em>); |
But there is also the feature of printf in java which we used to do in C programming:
Syntax:
1 2 3 4 5 |
//In C language <strong>printf</strong>("format_string", comma_separated_list_of_expressions); //In JAVA System.out.<strong>printf</strong>("format_string", separated_list_of_expressions); |
For eg:
1 2 3 4 5 6 |
//In C we use void main(){ int sum = 4; printf("The sum is %d , sum); } |
which outputs like this in C :
But in JavaRead More »Java’s Print similarities to C
NOW IN THIS PART U WILL LEARN HOW TO CONVERT TEMPERATURE TO FAHRENHEIT OR VICE VERSA [sourcecode=’java’] public class Temperature { public static double temp;… Read More »Temperature Convert
Actually Interface are just like a class where it consists only constants and they
We can extend interface via interfaces
We can implement the interface via classes.
In interface needn’t use the “public” or “abstract” keywords – all methods
declared by an interface are automatically public and abstract by default.
A simple example of interface implement is given below.
[sourcecode=’java’]
public interface testInterface {
//one of the method without method body
void disp(String text);
}[/sourcecode]
For implementing this interface through normal class we follow below step:Read More »Interface Class