Java-Tutorials
Java Tutorials - Best Java Tutorials Directory. Java is a portable object-oriented language developed by Sun Microsystems. Originally used mostly for web programming, it is now used primarily to develop large web-based applications. Find tutorials, example codes about Sun Java Technology. |
|
|
|
Java-Tutorials
|
Java Substring
A part of String is called substring. Substrings are also a String. Substring is used to create small strings. Sometimes a programmer needs only a part of String so, how they can find the substring.
View Rating |
|
|
Java-Tutorials
|
What is Public static void main
In most of the Programming language, main function is the first function where program start execution. This is the first method from where Java Virtual Machine(JVM) start executing. Following are the variation of main method.
View Rating |
|
|
Java-Tutorials
|
Java char to string
Following program will show you how to convert a char into a string in Java. Though there are many ways to convert a char to a string we will use toString() method. This reads a character and returns the String equivalent of it. In this example a class 'CharToString' is used. System.in is used to read the input from system/user at the run time.
View Rating |
|
|
Java-Tutorials
|
Calculator program in Java
Calculator program in Java is used by programmer to add, subtract, multiply or divide two integer numbers that are input by system. In the given example a class 'calculator' is used. System.in takes the input from the system/user at run time. InputStreamReader reads the input from System.in and then keep it into Buffer. Here is the Example of Calculator in Java program.
View Rating |
|
|
Java-Tutorials
|
Abstraction in Java
Abstraction is one of the four pillar of OOPS Concept. Abstraction in java is a process by which hiding the irrelevant data and exposing only the essential feature of object. In java Abstraction is achieved by using abstract class and interface.
View Rating |
|
|
Java-Tutorials
|
Java API
API stands for Application Programming Interface, an API can define how a programmer can access a functionality within a library of code. Java Application Programming Interface is a library of classes, interfaces with their methods, constructors that come with JDK.
View Rating |
|
|
Java-Tutorials
|
Factorial Program in Java
Factorial program in Java helps programmer to write factors of any given integer number. In the following example, a class by the name 'Factorial1' is used. BufferReader is defined under the Java I/O package. System.in is used to take the input from system/user at run time. InputStreamReader reads the input from user and then keep it into a buffer.
View Rating |
|
|
Java-Tutorials
|
Binary Search in Java
Binary Search in Java is used to search an element from an array. Programmers opt for Binary search over linear search when it comes to large numbers. It can be done either recursively or iteratively. The program checks the entered value with the middle element of the array. If they match the algorithm stops and position is returned. If it does not match than we have two cases.
View Rating |
|
|
Java-Tutorials
|
Palindrome program in Java
Palindrome program in Java helps programmers to determine if a number or string is palindrome or not. palindrome number or string remains unchanged when reversed. For example Eve, Eva, can I stab bats in a cave, Bob, 212, 141, etc. The logic used in Java program behind finding a number or sting is palindrome or not is just to reverse the number or string.
View Rating |
|
|