Java Articles

Page 438 of 450

How to set Java Path in Linux OS?

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

Environment variable PATH should be set to point to where the Java binaries have been installed. Refer to your shell documentation if you have trouble doing this.Example, if you use bash as your shell, then you would add the following line to the end of your '.bashrc: export PATH=/path/to/java:$PATH'

Read More

How to set Java Path in Linux OS?

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

Environment variable PATH should be set to point to where the Java binaries have been installed. Refer to your shell documentation if you have trouble doing this.Example, if you use bash as your shell, then you would add the following line to the end of your '.bashrc: export PATH=/path/to/java:$PATH'

Read More

How to set JAVA_HOME for Java in Linux?

Ayyan
Ayyan
Updated on 30-Jul-2019 302 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 302 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 771 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 771 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 1K+ 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 1K+ 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
Showing 4371–4380 of 4,498 articles
« Prev 1 436 437 438 439 440 450 Next »
Advertisements