Object Oriented Programming Articles

Page 577 of 589

What is JAVA_HOME variable in Java Environment?

Anjana
Anjana
Updated on 30-Jul-2019 550 Views

JAVA_HOME refers to jdk/bin directory. It is used by a java based application.

Read More

How to set Java Path in Linux OS?

Manikanth Mani
Manikanth Mani
Updated on 30-Jul-2019 482 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 299 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 767 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 997 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

Difference between HashMap and HashTable in Java.

Ankitha Reddy
Ankitha Reddy
Updated on 30-Jul-2019 21K+ Views

HashMap is non-syncronized and is not thread safe while HashTable is thread safe and is synchronized. HashMap allows one null key and values can be null whereas HashTable doesn't allow null key or value. HashMap is faster than HashTable. HashMap iterator is fail-safe where HashTable iterator is not fail-safe. HashMap extends AbstractMap class where HashTable extends Dictionary class.

Read More

How to avoid Java code in jsp page?

radhakrishna
radhakrishna
Updated on 30-Jul-2019 322 Views

You can use JSTL, JSP Standard Tag Library or EL, Expression Language to avoid scriptlets.

Read More

How do we compare String in Java

Giri Raju
Giri Raju
Updated on 30-Jul-2019 301 Views

https://www.tutorialspoint.com/javaexamples/string_compare.htm

Read More

When to use LinkedList over ArrayList in Java

Paul Richard
Paul Richard
Updated on 30-Jul-2019 3K+ Views

LinkedList should be used where modifications to a collection are frequent like addition/deletion operations. LinkedList is much faster as compare to ArrayList in such cases. In case of read-only collections or collections which are rarely modified, ArrayList is suitable.

Read More
Showing 5761–5770 of 5,881 articles
« Prev 1 575 576 577 578 579 589 Next »
Advertisements