Call Java Oracle Functions From Java program Beginning with version 8i, the Oracle database includes a fully functional Java Virtual Machine, Oracle JVM. Out of this close relationship between Oracle and Java emerges an important technology for Oracle developers: Java stored procedures. With Java stored procedures, developers have the ability to harness the power of …
Core Java
Passing arguments and properties from command line
Arguments and properties can be passed to a java application from command line. In this techical tip, let us see how to pass arguments as well as properties from command line. also read: Java Tutorials Java EE Tutorials Design Patterns Tutorials Java File IO Tutorials Passing arguments from command line The syntax to pass arguments …
Generation of Random Numbers
Random numbers in java can be generated either by using the Random class in java.util package or by using the random() method in the Math class in java.lang package. also read: Java Tutorials Java EE Tutorials Design Patterns Tutorials Java File IO Tutorials In both these approaches, we only get a pseudo random number and …
Parsing Input using Scanner
A Scanner object can be used to read text input from a number of sources. The input source can be a file, an input stream or even from a string. It internally uses the Regular Expression Api for parsing and getting the input. Let us see a simple example to parse a String object, also …
Storing Application Data using Preferences API
Applications can now make use of the Java Preferences API for storing and retrieving Application related data. The location where the Data gets stored is implementation specific. Two levels of Preferences come into picture, one is the User Preferences for storing user information and the other is the System Preferences that deals with information common …
Threads Synchronization
Synchronization is done in order to protect a segment of code from being accessed by more than a single Thread at any particular instance of time. In Java, synchronization is achieved with the use of synchronized keyword. Synchronization can be applied to methods as well as to a block of code. also read: Java Tutorials …
HashCode and equals methods
HashTable, HashMap and HashSet are the Collection classes in java.util package that make use of hashing algorithm to store objects. In all these Collection classes except HashSet, objects are stored as key-value pairs. For the storage and the retrieval of any user-defined objects it is a good practice to override the following methods which is …