Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 15

Keyword and identifier

What is java and Feature of java(refer java tutorial Document)

Installation and path setting of java and configuring eclipse as IDE

var/method(static and non static)

Scope or def block

Class/Object

Constructor(parametrize and non parametrize)

Diff bw constructor and method

Increment/Dec examples using xpression

Packages

OOPS(All 4) with examples

this and super keywords and their uses

Access specifier[private protected default public]

Scanner API

SIB,IIB and in a class if we have mixture of SIB,

IIB and static and non static function how the execution flow.

Wrapper classes(primitive to derived and vice versa)

Casting for primitive data types and derived data types

Arrays

switch case if, else if,else, for,for each,do,while,do and while

Abstarct class and interface and their properties

Exception hanling,Final, finally

[File handling(File,Directory,FileReader,FileWriter,BufferedReader,BufferedWriter,

FileInputStream,FileOutputStream,BufferedInputStream,BufferedOutputStream)]

Threading and synchronization

String,StringBuffer,StringBuild

***Collection(List,Map,Set,Iterator,ListIterator, Enumeration)

Java is one of the most popular and widely used programming language and
platform. A platform is an environment that helps to develop and run programs
written in any programming
language. 

 
Java is fast, reliable and secure. From desktop to web applications, scientific
supercomputers to gaming consoles, cell phones to the Internet, Java is used in every
nook and corner. Java is easy to learn and its syntax is simple and easy to
understand. It is based on C++ (so easier for programmers who know C++). Java has
removed many confusing and rarely-used features e.g. explicit pointers, operator
overloading etc. Java also takes care of memory management and for that, it
provides an automatic garbage collector. This collects the unused objects
automatically.
Java Tutorial

 
Below is the complete guide as to how to get started with Java and make yourself
proficient in it.
1. About Java: Before taking your step, the most important thing to do is to
get the answer of all WHYs. Here it refers to the questions like WHAT IS
JAVA, WHY IT IS POPULAR, WHAT ARE ITS FEATURES etc. By
digging into the mentioned article, you will not only learn the important
things about Java but also you will understand how to start learning
it. Learn about Java here: How to start learning Java 
2. Java Environment: To work on any programming language, one first
needs to know about its environment. Environment refers to the
circumstances where a programming language works and how that
program works. Java runs on a JVM environment. Click on the mentioned
article to know more about JVM, its architecture and how it works. Learn
about JVM here: JVM 
3. Java Programming Basics: To become proficient in any programming
language, one Firstly needs to understand the basics of that language.
Therefore, this article will give you in-depth knowledge of the basics of
Java in a very simple format. By reading this article, you will get the
topics from how to set up the Java Environment to the details about its
coding. Learn about Java Programming Basics here: Java
Programming Basics 
4. Object Oriented Programming (OOPs) Concept in Java : Java is an
object-oriented programming language. OOP makes the complete program
simpler by dividing it into a number of objects. The objects can be used as
a bridge to have data flow from one function to another. We can easily
modify data and function as per the requirement. Hence learning about
OOPs concepts makes a very important step in learning Java. Learn
about OOPs concepts in Java here: Object Oriented Programming
(OOPs) Concept in Java 
5. Classes and Objects in Java: Classes and Objects are basic concepts of
Object Oriented Programming which revolve around the real-life entities
and Java Programming. It means that to implement anything in Java,
Classes and objects are made. This article will give you an insight about
Classes and Objects and also help you relate it to the real world. Learn
about Classes and Objects in Java here: Classes and Objects in Java 
6. Constructors in Java: In Order to efficiently use Classes and Objects,
one needs to know about the Constructors in Java. Constructors are used
to initialize the object’s state. Like methods, a constructor also contains
collection of statements(i.e. instructions) that are executed at time of
Object creation. Learn about Constructors in Java here: Constructors
in Java 
7. Methods in Java: A method is a collection of statements that perform
some specific task and return result to the caller. A method can perform
some specific task without returning anything. Methods allow us to reuse
the code without retyping the code. In Java, every method must be part of
some class which is different from languages like C, C++ and Python.
Methods are time savers and help us to reuse the code without retyping the
code. This not only makes methods an important part of Java but also a
must learn topic for learners. Learn about Methods in Java
here: Methods in Java 
8. Strings in Java: Strings are defined as an array of characters. Java, unlike
other programming languages, provides a very easy implementation of
Strings which can be learnt even by a beginner. Hover over this mentioned
article to learn in depth about the Strings in Java. Learn about Strings in
Java here: Strings in Java 

9. Arrays in Java: An array is a group of like-typed variables that are


referred to by a common name. Arrays in Java work differently than they
do in C/C++. To know more, refer the mentioned article. Learn about
Arrays in Java here: Arrays in Java 
10. Collections in Java: A Collection is a group of individual objects
represented as a single unit. Java provides Collection Framework which
defines several classes and interfaces to represent a group of objects as a
single unit. Java Collection Framework is not the most important part in
learning Data Structures and Algorithms, but also it is the most useful
module in a programming language Learn about Collections in Java
here: Collections in Java 
11. Generics in Java: Generics in Java is similar to templates in C++. The
idea is to allow type (Integer, String, … etc and user-defined types) to be a
parameter to methods, classes and interfaces. For example, classes like
HashSet, ArrayList, HashMap, etc use generics very well. We can use
them for any type. So not only Generics makes a very important asset in
programming, but it also makes the backbone of writing efficient code as
well. Learn about Generics in Java here: Generics in Java 
12. Stream In Java: Introduced in Java 8, the Stream API is used to process
collections of objects. A stream is a sequence of objects that support
various methods which can be pipelined to produce the desired result.
Though this was introduced later in Java, it has gained huge importance in
the Java programming very quickly. To be able to work on data fluently in
Java, one must learn about the Streams. Learn about Stream In Java
here: Stream In Java 
13. Exceptions and Exception Handling in Java : Many a times in the
learning of Java till now, you must have come across the word
“EXCEPTION”. An exception is an unwanted or unexpected event, which
occurs during the execution of a program i.e at run time, that disrupts the
normal flow of the program’s instructions. So to develop a module that
does not break, one has to learn how to handle exceptions. Learn about
Exceptions and Exception Handling in Java here: Exceptions and
Exception Handling in Java 
14. Regular Expressions (ReGex) in Java : Though this word might seem
new to you, Regular Expression is a very important part of Development.
Regular Expressions or Regex (in short) is an API for defining String
patterns that can be used for searching, manipulating and editing text. It is
widely used to define a constraint on strings such as a password. Learn
about Regular Expressions here: Regular Expressions (ReGex) in
Java
15. Multithreading in Java: Multithreading is a Java feature that allows
concurrent execution of two or more parts of a program for maximum
utilization of CPU. Each part of such a program is called a thread. So,
threads are light-weight processes within a process. Though this might
seem difficult at first, its a very important part of concurrent programming
in Java. Learn about Multithreading in Java here: Multithreading in
Java 
16. File Handling in Java: Java too supports file handling and allows users to
handle files i.e., to read and write files, along with many other file
handling options, to operate on files. The concept of file handling has
stretched over various other languages, but the implementation is either
complicated or lengthy, but alike other concepts of Java, this concept here
is also easy and short. Learn about File Handling in Java here: File
Handling in Java 
17. Packages in Java: Package in Java is a mechanism to encapsulate a group
of classes, sub packages and interfaces. In other words, a package in Java
refers to a collection of classes, interfaces, abstract classes, and exceptions
that will help in a module in Java programming. Learn about Packages
in Java here: Packages in Java 

Recent Articles on Java


Java Programs – Basics to Advanced
Java Interview Questions
 

 Overview
 Basics
 Input/Output
 Flow Control
 Operators
 Strings
 Arrays
 OOPs Concepts
 Inheritance
 Abstraction
 Encapsulation
 Polymorphism
 Constructors
 Methods
 Interfaces
 Wrapper Classes
 Keywords
 Access Modifiers
 Memory Allocation
 

 Classes
 Packages
 Collection Framework
 List
 Queue
 Map
 Set
 Exception Handling
 Multithreading
 Synchronization
 File Handling
 Regex
 Java IO
 Networking
 Java 8 Features
 Date & Time
 JDBC
 Miscellaneous
 Interview Questions
 
Overview of Java
 Introduction to Java
 History of Java
 Java vs C++ Python
 How to Download and Install Java?
 Setting Up the Environment in Java
 How to Download and Install Eclipse on Windows?
 Java Development Kit (JDK) in Java
 JVM and its architecture
 Differences between JDK, JRE, and JVM
 Just In Time Compiler
 Difference Between JIT and JVM
 Difference Between Byte Code and Machine Code
 How is the Java platform independent?
Basics of Java
 Java Basic Syntax
 First Java Program (Hello World)
 Datatypes in Java
 Difference between Primitive and Non-Primitive Datatypes
 Java Identifiers
 Operators in Java
 Java Variables
 Scope of Variables
 Wrapper Classes in Java
Input/Output in Java
 How to take Input from users in Java
 Scanner class in Java
 BufferedReader class in Java
 Scanner vs BufferedReader in Java
 Ways to Read Input from Console in Java
 Print Output in Java
 Difference between print() and println() in Java
 Formatted Outputs in Java
 Fast Input-Output for Competitive Programming in Java
Flow Control in Java
 Decision making in Java
 If Statement in Java
 If-Else Statement in java
 If-Else-If ladder in Java
 Loops in Java
 For loop
 While Loop
 Do while loop
 For each loop
 Continue Statement in java
 Break Statement In Java
 Usage of Break in Java
 Return Statement in Java
Operators in Java
 Arithmetic Operator
 Unary Operator
 Assignment Operator
 Relational Operator
 Logical Operator
 Ternary Operator
 Bitwise Operator
Strings in Java
 Introduction of Strings in Java
 String class in Java Set-1 | Set-2
 Why strings are immutable in Java?
 StringBuffer class in Java
 StringBuilder class in Java
 Strings vs StringBuffer vs StringBuilder in Java
 StringTokenizer class in Java Set-1 | Set-2
 StringJoiner in Java
 Java String Programs
Arrays in Java
 Introduction to Arrays in Java
 Arrays class in Java
 Multi-Dimensional Array in Java
 How to declare and initialize 2D arrays in Java
 Jagged array in Java
 Final Arrays in Java
 Reflect Arrays in Java
 Difference between util.Arrays and reflect.Arrays
 Java Array Programs
OOPS in Java
 OOPS Concept in Java
 Why Java is not a purely Object-Oriented Language?
 Classes and Objects
 Naming Convention in Java
 Methods in Java
 Access Modifiers in Java
 Constructors in Java
 Four pillars of OOPS in Java
 Inheritance in Java
 Abstraction in Java
 Encapsulation in Java
 Polymorphism in Java
 Interfaces in Java
 This reference in Java
Inheritance in Java
 Introduction to Inheritance in Java
 Inheritance and Constructors
 Multiple Inheritance in Java
 Interfaces and Inheritance
 Association, Composition and Aggregation
 Difference between Inheritance in C++ and Java
Abstraction in Java
 Introduction to Abstraction in Java
 Abstract Keyword in Java
 Abstract classes in Java
 Abstract class vs Interface in Java
 Control Abstraction in Java
 Difference between Data Hiding and Abstraction
Encapsulation in Java
 Introduction to Encapsulation in Java
 Difference between Encapsulation and Abstraction
Polymorphism in Java
 Introduction to Polymorphism in Java
 Difference between Inheritance and Polymorphism
 Runtime Polymorphism in Java
 Compile-Time vs Runtime Polymorphism
Constructors in Java
 Introduction to Constructors in Java
 Copy Constructor in Java
 Constructor Overloading
 Constructor Chaining
 Private Constructors and Singleton Class
Methods in Java
 Introduction to methods in Java
 Different method calls in Java
 Difference between Static methods and Instance methods in Java
 Abstract methods in Java
 Method Overriding in Java
 Method Overloading in Java
 Method Overloading Vs Method Overriding
Interfaces in Java
 Java Interfaces
 Interfaces and Inheritance in Java
 Difference between Interface and Class in Java
 Functional Interface
 Nested Interface
 Marker Interface
 Comparator Interface
Wrapper Classes in Java
 Need of Wrapper classes in Java
 How to create instances of Wrapper classes
 Character class in Java
 Byte class in Java
 Short class in Java
 Integer class in Java
 Long class in Java
 Float class in Java
 Double class in Java
 Boolean class in Java
 Autoboxing and Unboxing
 Type Conversion in Java
Keywords in Java
 List of all Java Keywords
 Important Keywords in Java
 Super Keyword
 Final Keyword
 Abstract keyword
 Static Keyword
 This Keyword
 Enum Keyword in Java
 Transient keyword in java
 Volatile keyword in java
 Final, Finally, and Finalize in Java
Access Modifiers in Java
 Introduction to Access Modifiers in Java
 Public vs Protected vs Package vs Private Access Modifier in Java
 Access Modifiers Vs Non-Access Modifiers in Java
Memory Allocation in Java
 Java Memory Management
 How are Java objects stored in memory
 Stack vs Heap memory allocation
 Types of memory areas allocated by JVM
 Garbage Collection in Java
 Heap and Stack memory allocation
 Types of JVM Garbage Collectors in Java
 Memory leaks in Java
 Java Virtual Machine(JVM) Stack Area
Classes of Java
 Classes and Objects
 Understanding classes and objects in Java
 Class vs interface
 Singleton class in java
 Object class in java
 Inner class in java
 Abstract classes in java
 Throwable class in java
Packages in Java
 Java Packages
 How to create a package in Java
 java.util package
 java.lang package
 java.io package
Collection Framework
 Java Collection Framework
 Collections class in Java
 Collection Interface in Java
 How to learn Java collections
 List Interface in Java
 Queue Interface in Java
 Map Interface in Java
 Set in Java
 Iterator in Java
 Comparator in Java
 Difference between Comparator and Comparable in Java
List
 ArrayList in Java
 Vector class in Java
 Stack class in Java
 LinkedList in Java
 AbstractList
 AbstractSequentialList
 CopyOnWriteArrayList
 Custom ArrayList in Java
Queue
 AbstractQueue
 ArrayBlockingQueue
 ConcurrentLinkedQueue
 LinkedBlockingQueue
 LinkedTransferQueue
 PriorityBlockingQueue
 Deque in Java
 ArrayDeque
 Concurrent LinkedDeque
 LinkedBlocking Deque
 Priority Queue in Java
Map
 EnumMap
 HashMap
 Working of HashMap
 Traverse through a HashMap in Java
 WeakHashMap
 LinkedHashMap
 IdentityHashMap
 ConcurrentHashMap
 Dictionary
 HashTable
 SortedMap
 TreeMap
 Stack
 Vector
Set
 AbstractSet
 EnumSet
 HashSet
 TreeSet
 SortedSet
 LinkedHashSet
 NavigableSet
 ConcurrentSkipListSet
 CopyOnWriteArraySet
Exception Handling in Java
 Exceptions in java
 Types of Exceptions
 Difference between Checked and Unchecked Exceptions
 Try, Catch, Finally, throw, and throws
 Flow control in Try catch block
 Throw vs Throws
 Final vs Finally vs Finalize
 User-defined custom exception
 Chained Exceptions
 Null pointer Exceptions
 Exception handling with method Overriding
Multithreading in Java
 Introduction to Multithreading in Java
 Lifecycle and Stages of a Thread
 Thread Priority in Java
 Main Thread in Java
 Thread class
 Runnable interface
 How to name a thread
 start() method in thread
 Difference between run() and start() Method
 sleep() method
 Daemon thread
 Thread Pool in Java
 Thread Group in Java
 Thread Safety in Java
 ShutdownHook
 Multithreading Tutorial
Synchronization in Java
 Java Synchronization
 Importance of Thread synchronization in Java
 Method and Block Synchronization in Java
 Local frameworks vs thread synchronization
 Difference between Atomic, Volatile, and Synchronized in Java
 Deadlock in Multithreading
 Deadlock Prevention and Avoidance
 Difference between Lock and Monitor in Concurrency
 Reentrant Lock
File Handling in Java
 File Class in java
 How to create files in java
 How to read files in java
 How to write on files in java
 How to delete a file in java
 File Permissions
 FileReader
 File Writer
 FileDescriptor class
 RandomAccessFile class
Java Regex
 Introduction to Java Regex
 How to write Regex expressions
 Matcher class
 Pattern class
 Quantifiers
 Character class
Java IO
 Introduction to Java IO
 Reader Class
 Writer Class
 FileInput stream
 File Output stream
 BufferedReader Input Stream
 BufferedReader Output stream
 BufferedReader vs Scanner
 Fast I/O in Java
Java Networking
 Introduction to Java Networking
 TCP architecture
 UDP architecture
 IPV4 vs IPV6
 Connection-oriented vs connectionless protocols
 Socket programming in Java
 Server Socket class
 URL class and methods
Java SE 8 Features
 Lambda Expressions
 Streams API
 New Date/Time API
 Default Methods
 Functional Interfaces
 Method references
 Optional class
 Stream Filter
 Type Annotations
 String Joiner
Java Date & Time
 Date Class in Java
 Methods of the Date class
 Java Current Date and time
 Compare dates in Java
Java JDBC
 Introduction to Java JDBC
 JDBC Driver
 JDBC Connection
 Types of Statements in JDBC
 JDBC Tutorial
Java Miscellaneous
 Introduction to Reflection API
 Java IO Tutorial
 JavaFX Tutorial
 Java RMI
 How to Run Java RMI application?
 Java 17 New Features
Interview Questions on Java
 Core Java Interview Questions
 Java Multiple Choice Questions

Features of Java

Java is one of the most popular and widely used programming languages.
 Java has been one of the most popular programming languages for many years.
 Java is Object Oriented. However, it is not considered as pure object-oriented as
it provides support for primitive data types (like int, char, etc)
 The Java codes are first compiled into byte code (machine-independent code).
Then the byte code runs on Java Virtual Machine (JVM) regardless of the
underlying architecture.
 Java syntax is similar to C/C++. But Java does not provide low-level
programming functionalities like pointers. Also, Java codes are always written
in the form of classes and objects.
 Java is used in all kinds of applications like Mobile Applications (Android is
Java-based), desktop applications, web applications, client-server applications,
enterprise applications, and many more.
 When compared with C++, Java codes are generally more maintainable because
Java does not allow many things which may lead to bad/inefficient
programming if used incorrectly. For example, non-primitives are always
references in Java. So we cannot pass large objects (like we can do in C++) to
functions, we always pass references in Java. One more example, since there are
no pointers, bad memory access is also not possible.
 When compared with Python, Java kind of fits between C++ and Python. The
programs are written in Java typically run faster than corresponding Python
programs and slower than C++. Like C++, Java does static type checking, but
Python does not.

Applications of Java

 Mobile Applications
 Desktop GUI Applications
 Artificial intelligence
 Scientific Applications
 Cloud Applications
 Embedded Systems
 Gaming Applications

Frequently Asked Questions on Java

Q.1 Why use Java ?

-Java is simple to learn programming language because doesn’t contain concepts like : Pointers
and operator overloading and it is secure and portable.

Q.2 How Java different to C++ ?

C++ JAVA

C++ is platform dependent. Java is platform independent.

C++ uses compiler only. Java uses compiler and interpreter both.

C++ support pointers and operator Java doesn’t support pointers and operator

overloading. overloading concept.


C++ JAVA

C++ not support multithreading

concept. Java supports multithreading concept.

You might also like