Java Articles

Page 438 of 450

How to set JAVA_HOME for Java in Linux?

Ayyan
Ayyan
Updated on 30-Jul-2019 296 Views

Assuming you have installed Java in \usr\local\java\jdk directory −if you use bash as your shell, then you would add the following line to the end of your '.bashrc: export JAVA_HOME=\usr\local\java\jdk'

Read More

How to set JAVA_HOME for Java in Linux?

Ayyan
Ayyan
Updated on 30-Jul-2019 296 Views

Assuming you have installed Java in \usr\local\java\jdk directory −if you use bash as your shell, then you would add the following line to the end of your '.bashrc: export JAVA_HOME=\usr\local\java\jdk'

Read More

How to set JAVA_HOME for Java in Mac OS?

Manikanth Mani
Manikanth Mani
Updated on 30-Jul-2019 764 Views

Assuming you have installed Java in \usr\local\java\jdk directory −if you use bash as your shell, then you would add the following line to the end of your '.bashrc: export JAVA_HOME=\usr\local\java\jdk'

Read More

How to set JAVA_HOME for Java in Mac OS?

Manikanth Mani
Manikanth Mani
Updated on 30-Jul-2019 764 Views

Assuming you have installed Java in \usr\local\java\jdk directory −if you use bash as your shell, then you would add the following line to the end of your '.bashrc: export JAVA_HOME=\usr\local\java\jdk'

Read More

Global variables in Java

Arushi
Arushi
Updated on 30-Jul-2019 989 Views

There is no global variables support in Java. Static variables can be used as an alternate solution for global variables.

Read More

Global variables in Java

Arushi
Arushi
Updated on 30-Jul-2019 989 Views

There is no global variables support in Java. Static variables can be used as an alternate solution for global variables.

Read More

Java Variable Narrowing Example

George John
George John
Updated on 30-Jul-2019 2K+ Views

Narrowing refers to passing a higher size data type like int to a lower size data type like short. It may lead to data loss. Casting is required for narrowing conversion. Following program output will be 44. public class MyFirstJavaProgram { public static void main(String []args) { int a = 300; byte b = (byte)a; // narrowing System.out.println(b); } }

Read More

Java Variable Narrowing Example

George John
George John
Updated on 30-Jul-2019 2K+ Views

Narrowing refers to passing a higher size data type like int to a lower size data type like short. It may lead to data loss. Casting is required for narrowing conversion. Following program output will be 44. public class MyFirstJavaProgram { public static void main(String []args) { int a = 300; byte b = (byte)a; // narrowing System.out.println(b); } }

Read More

How to put two public classes in a Java package.

Srinivas Gorla
Srinivas Gorla
Updated on 30-Jul-2019 493 Views

Yes. The only condition is to have one public class in separate java file.

Read More

How to put two public classes in a Java package.

Srinivas Gorla
Srinivas Gorla
Updated on 30-Jul-2019 493 Views

Yes. The only condition is to have one public class in separate java file.

Read More
Showing 4371–4380 of 4,496 articles
« Prev 1 436 437 438 439 440 450 Next »
Advertisements