JAVA EXAMPLE PROGRAMS

JAVA EXAMPLE PROGRAMS

Publish Your Article Here

Introduction

Java is an object-oriented, cross platform, multi-purpose programming language produced by Sun Microsystems, later acquired by Oracle Corporation. One thing that distinguished Java from some other languages is its ability to run the same compiled code across multiple operating systems. In other languages, the source code (code that is written by the programmer), is compiled by a compiler into an executable file. This file is in machine language, and is intended for a single operating system/processor combination, so the programmer would have to re-compile the program seperately for each new operating system/processor combination. Java is different in that it does not compile the code directly into machine language code. Compilation creates bytecode out of the source code.
The heart of the Java platform is the concept of a "virtual machine" that executes Java bytecode programs. This bytecode is the same no matter what hardware or operating system the program is running under. There is a JIT (Just In Time) compiler within the Java Virtual Machine, or JVM. The JIT compiler translates the Java bytecode into native processor instructions at run-time and caches the native code in memory during execution.
Although Java programs are cross-platform or platform independent, the code of the Java Virtual Machines (JVM) that execute these programs is not. Every supported operating platform has its own JVM.
Core Spring Examples
The Spring Framework provides a comprehensive programming and configuration model for modern Java-based enterprise applications - on any kind of deployment platform. A key element of Spring is infrastructural support at the application level: Spring focuses on the "plumbing" of...
Restful Web Service Examples
RESTful web services are built to work best on the Web. Representational State Transfer (REST) is an architectural style that specifies constraints, such as the uniform interface, that if applied to a web service induce desirable properties, such as performance, scalability, and modifiability...
Collections & Util Package
A collections framework is a unified architecture for representing and manipulating collections. Java Collections Framework reduces programming effort, increases program speed and quality, allows interoperability among unrelated APIs, fosters software reuse.
Data Structures
A data structure is a particular way of storing and organizing data in a computer so that it can be used efficiently. Data structures provide a means to manage large amounts of data efficiently. efficient data structures are a key to designing efficient algorithms.
Java Interview Programs
We have collected list of java interview programs from few software engineers and also with my personal experience. In this section, we are trying to give you the best solutions for these problems. Good interviewers are more interested in your ability to code.
Java Sorting Algorithms
A sorting algorithm is an algorithm that puts elements of a list in a certain order. The most-used orders are numerical order and lexicographical order. Efficient sorting is important for optimizing the use of other algorithms such as search and merge...
Java JDBC Examples
JDBC stands for Java Database Connectivity. JDBC API is a collection of classes and interfaces, which help a Java application to connect to SQL based relational databases by abstracting vendor specific details of the database. JDBC enables Java developers to connect to...
Java Annotations Examples
Java Annotations are also called Metadata. Annotations are introduced with JDK 5 onwards. Annotations allows us to add some form of metadata information into our source code, but it doesnot change the execution flow of the program. These annotations...


Knowledge Centre
Stream and types of Streams
A Stream is an abstraction that either produces or consumes information. There are two types of Streams and they are:

Byte Streams: Provide a convenient means for handling input and output of bytes. Byte Streams classes are defined by using two abstract classes, namely InputStream and OutputStream.

Character Streams: Provide a convenient means for handling input & output of characters. Character Streams classes are defined by using two abstract classes, namely Reader and Writer.
Famous Quotations
I respect faith, but doubt is what gets you an education.
-- Wilson Mizner

About Author

I'm Nataraja Gootooru, programmer by profession and passionate about technologies. All examples given here are as simple as possible to help beginners. The source code is compiled and tested in my dev environment.

If you come across any mistakes or bugs, please email me to [email protected].

Most Visited Pages

Other Interesting Sites

Reference: Java™ Platform Standard Ed. 7 - API Specification | Java™ Platform Standard Ed. 8 - API Specification | Java is registered trademark of Oracle.
Privacy Policy | Copyright © 2022 by Nataraja Gootooru. All Rights Reserved.