• phone icon +44 7459 302492 email message icon info@uplatz.com
  • Register

4.9 (305 reviews)
( 2872 Students )


Java Programming Basics

This Java course covers the length and breadth of this platform-independent and object-oriented language.
( add to cart )
Save 59% Offer ends on 31-Jul-2024
Course Duration: 20 Hours
Preview Java Programming Basics course
View Course Curriculum   Price Match Guarantee   Full Lifetime Access     Access on any Device   Technical Support    Secure Checkout   Course Completion Certificate
Instant access

Students also bought -

Completed the course? Request here for Certificate. ALL COURSES

Java is one of the most used and most popular programming languages in the world of IT development. Given its properties of platform independence, object-oriented approach, reusable code and dynamic classes, Java has emerged to be the most preferred language for programmers. It is quite easy to learn and implement, thus making it highly favorable in the programming community. Its popularity also stems from the fact that it was built keeping security in mind, and enables programmers to write code with fewer bugs, in lesser time.


Besides the fact that Java is among the top programming languages of 2020 and perhaps will remain so for at least a decade, Java has nailed it in almost every domain you can think of! As Java is secure and multi-threaded, it is perfect for Banking and transaction management services. E-commerce shops and billing software have their logic written in frameworks based on Core Java. Mobile OS like Android uses Java APIs. Stock market algorithms are based out of Java. Java along with other frameworks like Spring makes for a robust combination to sort implementation dependencies and write server-side applications in Finance and IT domains.


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 a very successful language and it has gained huge popularity.


Key features of Java include:

1) Java is a simple language - Java is easy to learn and its syntax is clear and concise. It is based on C++ (so it is easier for programmers who know C++).

2) Java is a platform-independent language - The programs written in Java language, after compilation, are converted into an intermediate level language called the bytecode which is a part of the Java platform irrespective of the machine on which the programs run.

3) 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.

4) Java is a robust language - Java programs must be reliable because they are used in both consumer and mission-critical applications, ranging from Blu-ray players to navigation systems.

5) Java is a multithreaded language - Java can perform many tasks at once by defining multiple threads.

6) Java programs can create applets - Applets are programs that run in web browsers.

7) Java does not require any preprocessor - It does not require inclusion of header files for creating a Java application.


The Java Fundamentals course from Uplatz teaches handy skills in Java programming language to professionals who have little or no experience in programming. This Java course covers the length and breadth of this platform-independent and object-oriented language that you can learn and implement easily for programming purposes.

Course/Topic - Java Programming - all lectures

  • In this video you will learn the introduction to Java programming. This tutorial explains the installation and usage of the Java programming language. It also contains examples for standard programming tasks.

    • 14:43
  • In this video you will learn based on the data type of a variable, the operating system allocates memory and decides what can be stored in the reserved memory. Therefore, by assigning different data types to variables, you can store integers, decimals, or characters in these variables.

    • 27:17
  • In this video you will learn about the control statement in java is a statement that determines whether the other statements will be executed or not. It controls the flow of a program. An 'if' statement in java determines the sequence of execution between a set of two statements.

    • 21:16
  • In this video you will learn Looping in programming languages is a feature which facilitates the execution of a set of instructions/functions repeatedly while some condition evaluates to true. while loop: A while loop is a control flow statement that allows code to be executed repeatedly based on a given Boolean condition.

    • 28:22
  • In this video you learn about Classes and Objects are basic concepts of Object Oriented Programming which revolve around the real life entities. A class is a user defined blueprint or prototype from which objects are created. It represents the set of properties or methods that are common to all objects of one type.

    • 14:24
  • In this you will learn In Java, static keyword is mainly used for memory management. It can be used with variables, methods, blocks and nested classes. It is a keyword which is used to share the same variable or method of a given class. Basically, static is used for a constant variable or a method that is same for every instance of a class.

    • 29:37
  • In this video you will learn about Array 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++. Following are some important points about Java arrays.

    • 28:13
  • In this video you will learn the java.util.Arrays.binarySearch(Object[] a, Object key) method searches the specified array for the specified object using the binary search algorithm. The array be sorted into ascending order according to the natural ordering of its elements prior to making this call. If it is not sorted, the results are undefined.

    • 32:51
  • In this video, you will learn about the Java multidimensional array using 2-dimensional arrays and 3-dimensional arrays with the help of examples.

    • 22:37
  • In this video you will learn the java.util.Arrays.sort(Object[] a, int fromIndex, int toIndex) method sorts the specified range of the specified array of objects into ascending order, according to the natural ordering of its elements. The range to be sorted extends from index fromIndex, inclusive, to index toIndex, exclusive.

    • 14:35
  • In this video you will learn Inheritance in Java is a mechanism in which one object acquires all the properties and behaviors of a parent object. It is an important part of OOPs (Object Oriented programming system).

    • 26:27
  • In this video you will learn more about Inheritance.

    • 23:04
  • In this video you will learn In Java, two or more methods can have same name if they differ in parameters (different number of parameters, different types of parameters, or both). These methods are called overloaded methods and this feature is called method overloading.

    • 30:35
  • In the last video, you will learn about inheritance. Inheritance is an OOP property that allows us to derive a new class (subclass) from an existing class (superclass). The subclass inherits the attributes and methods of the superclass.

    • 32:42
  • In this video you will learn about t he super keyword in java is a reference variable that is used to refer parent class objects. ... Basically this form of super is used to initialize superclass variables when there is no constructor present in superclass. On the other hand, it is generally used to access the specific variable of a superclass.

    • 31:17
  • In this video you will learn about the Java programming language, the final keyword is used in several contexts to define an entity that can only be assigned once. Once a final variable has been assigned, it always contains the same value.

    • 25:25
  • In this video you will learn about Polymorphism, it is the ability of an object to take on many forms. The most common use of polymorphism in OOP occurs when a parent class reference is used to refer to a child class object. Any Java object that can pass more than one IS-A test is considered to be polymorphic.

    • 39:06
  • In this video you will learn about the class which is declared with the abstract keyword is known as an abstract class in Java. It can have abstract and non-abstract methods (method with the body).

    • 20:50
  • In this video you will learn about methods form the object's interface with the outside world; the buttons on the front of your television set, for example, are the interface between you and the electrical wiring on the other side of its plastic casing. You press the "power" button to turn the television on and off.

    • 19:20
  • In this video you will learn the interface is a reference type in Java. It is similar to class. It is a collection of abstract methods. A class implements an interface, thereby inheriting the abstract methods of the interface.

    • 15:29
  • In this video you will learn about the interface in Java is a mechanism to achieve abstraction. There can be only abstract methods in the Java interface, not method body. It is used to achieve abstraction and multiple inheritance in Java.

    • 18:14
  • In this video you will learn about the main difference is methods of a Java interface are implicitly abstract and cannot have implementations. A Java abstract class can have instance methods that implements a default behavior. ... A Java class can implement multiple interfaces but it can extend only one abstract class.

    • 11:34
  • In this video you will learn about the packages in Java is used to group related classes. Think of it as a folder in a file directory. We use packages to avoid name conflicts, and to write a better maintainable code. Built-in Packages (packages from the Java API) User-defined Packages (create your own packages)

    • 23:36
  • In this video you will learn about the access modifier, there are four types of Java access modifiers: Private: The access level of a private modifier is only within the class. Default: The access level of a default modifier is only within the package. Protected: The access level of a protected modifier is within the package and outside the package through child class.

    • 17:23
  • In this video you will learn about the Encapsulation in Java is a mechanism of wrapping the data (variables) and code acting on the data (methods) together as a single unit. In encapsulation, the variables of a class will be hidden from other classes, and can be accessed only through the methods of their current class.

    • 15:49
  • In this video you will learn about the Strings in Java are Objects that are backed internally by a char array. Since arrays are immutable (cannot grow), Strings are immutable as well. Whenever a change to a String is made, an entirely new String is created. Below is the basic syntax for declaring a string in Java programming language.

    • 27:21
  • In this video you will learn about Java String, how to create it and its various methods with the help of examples. In Java, a string is a sequence of characters. For example, "hello" is a string containing a sequence of characters 'h', 'e', 'l', 'l', and 'o'.

    • 35:22
  • In this video you will learn about the Exception (or exceptional event) is a problem that arises during the execution of a program. When an Exception occurs the normal flow of the program is disrupted and the program/Application terminates abnormally, which is not recommended, therefore, these exceptions are to be handled.

    • 14:35
  • In this video you will learn about the Customized Exception Handling: Java exception handling is managed via five keywords: try, catch, throw, throws, and finally. Briefly, here is how they work. Program statements that you think can raise exceptions are contained within a try block. If an exception occurs within the try block, it is thrown.

    • 28:28
  • In this video you will learn about the Finally block contains all the crucial statements that must be executed whether exception occurs or not. ... The statements present in this block will always execute regardless of whether exception occurs in try block or not such as closing a connection, stream etc.

    • 28:33
  • In this video you will learn about the Java exception this fall into two main categories: checked exceptions and unchecked exceptions. In this article, we'll provide some code samples on how to use them.

    • 17:08
  • In this video you will learn about the Throw is a keyword which is used to throw an exception explicitly in the program inside a function or inside a block of code. Throws is a keyword used in the method signature used to declare an exception which might get thrown by the function while executing the code

    • 34:03
  • In this video you will learn how to create a custom exception in Java. We’ll show how user-defined exceptions are implemented and used for both checked and unchecked exceptions.

    • 10:50
  • In this video you will learn about the Threads which allows a program to operate more efficiently by doing multiple things at the same time. Threads can be used to perform complicated tasks in the background without interrupting the main program.

    • 34:41
  • In this video you will learn about the Thread class provides the join, method which allows one thread to wait until another thread completes its execution. If t is a Thread object whose thread is currently executing, then t. join, will make sure that t is terminated before the next instruction is executed by the program.

    • 35:28
  • In this video you will learn about the Synchronization in java is the capability to control the access of multiple threads to any shared resource. Java Synchronization is better option where we want to allow only one thread to access the shared resource.

    • 26:47
  • In this video you will learn about the Inter Thread Communication, if you are aware of inter-process communication then it will be easy for you to understand interthread communication. Interthread communication is important when you develop an application where two or more threads exchange some information.

    • 22:07
  • In this video you will learn about the Linked List, it is a part of the Collection framework present in java. util package. This class is an implementation of the Linked List data structure which is a linear data structure where the elements are not stored in contiguous locations and every element is a separate object with a data part and address part.

    • 36:22
  • In this video you will learn about the Linked List, it is a part of the Collection framework present in java. util package. This class is an implementation of the LinkedList data structure which is a linear data structure where the elements are not stored in contiguous locations and every element is a separate object with a data part and address part.

    • 27:38
  • In this video you will learn about the Java Hash Set it class is used to create a collection that uses a hash table for storage. It inherits the Abstract Set class and implements Set interface. The important points about Java HashSet class are: HashSet stores the elements by using a mechanism called hashing. HashSet contains unique elements only.

    • 28:58
  • In this video you will learn about the Comparable and comparator, these both are an interface that can be used to sort the elements of the collection. Comparator interface belongs to java.util package while comparable belongs to java. Lang package. Comparator interface sort collection using two objects provided to it, whereas comparable interface compares" this" refers to the one objects provided to it.

    • 36:54
  • In this video you will learn about the queue its interface is provided in java. util package and it implements the Collection interface. The queue implements FIFO i.e. First in First Out. This means that the elements entered first are the ones that are deleted first.

    • 12:28
  • In this video you will learn about the Map its interface present in java util package represents a mapping between a key and a value. The Map interface is not a subtype of the Collection interface. Therefore, it behaves a bit differently from the rest of the collection types. A map contains unique keys.

    • 30:03
  • In this video you will learn about the Map its implementations are grouped into general-purpose, special-purpose, and concurrent implementations.

    • 16:55
  • In this video you will learn about JDBC it stands for Java Database Connectivity. JDBC is a Java API to connect and execute the query with the database. It is a part of JavaSE (Java Standard Edition). JDBC API uses JDBC drivers to connect with the database. There are four types of JDBC drivers.

    • 17:48
  • In this video you will learn about the JDBC API is a Java API that can access any kind of tabular data, especially data stored in a Relational Database. JDBC works with Java on a variety of platforms, such as Windows, Mac OS, and the various versions of UNIX.

    • 31:19
  • In this video you will learn how to create a simple JDBC application. This will show you how to open a database connection, execute a SQL query, and display the results.

    • 15:28
  • In this video you will learn how to use a Java JDBC Prepared Statement instead of a Statement and benefit from the features of the Prepared Statement. The Java JDBC Prepared Statement primary features are: Easy to insert parameters into the SQL statement

    • 21:47
  • In this video you will learn about Callable Statement Database in this Once a connection is obtained, we can interact with the database. The JDBC Statement, Callable Statement, and Prepared Statement interfaces define the methods and properties that enable you to send SQL or PL/SQL commands and receive data from your database

    • 22:37
  • In this video you will learn about the dynamic database refers to the process of firing SQL queries on demand to create the schema afresh. The JDBC API library is quite capable of dealing with the situation.

    • 23:17
  • In this video you will learn about the Lambda expressions are introduced in Java 8 and are touted to be the biggest feature of Java 8. Lambda expression facilitates functional programming, and simplifies the development a lot.

    • 35:08
  • In this video you will learn about the Predicate it is a generic functional interface that represents a single argument function that returns a Boolean value (true or false). This interface available in java unit function package and contains a test method that evaluates the predicate of a given argument.

    • 22:41
  • In this video you will learn about the article Lambda Expression with Collections are discussed with examples of sorting different collections like Array List, Tree Set, Tree Map, etc.

    • 21:19
  • In this video you will learn about the Consumer it is an in-built functional interface introduced in Java 8 in the java. util. function package. Consumer can be used in all contexts where an object needs to be consumed that is taken as input, and some operation is to be performed on the object without returning any result.

    • 19:12
  • In this video you will learn about the Stream, it is a new abstract layer introduced in Java 8. Using stream, you can process data in a declarative way similar to SQL statements. For example, consider the following SQL statement.

    • 10:41
  • In this video, you will learn the major pieces of new functionality Java 8 had added – Streams. We'll explain what streams are about and showcase the creation and basic stream operations with simple examples

    • 28:19
Course Objectives Back to Top

Examine the Java development environment

Identify fundamentals of Java syntax

Describe how to compile and run a simple Java application

Describe how to construct simple variables and arrays

Describe how to construct simple expressions and control flow

Identify object-oriented programming concepts

Describe how Java implements object-oriented programming

Describe the structure of classes

Describe how simple inheritance is used

Describe class and variable access modifiers


Course Syllabus Back to Top

Java Overview

• How the Java Environment Works

• HelloWorld Program

• Launch Single-File Source Code

• jShell REPL

• Comments and Terminators

• Identifiers


Syntax and Types

• Java Variables

• var declarations

• Java Types

• Basic Java Types

• Reference types

• Conditional Expressions

• Logical operators

• If statement

• While Statement

• Do Statement

• For statement

• Special flow of control operators

• Switch statement

• Numerical Operators

• Casting

• Strings


Classes and Objects

• What is an Object?

• Objects and Encapsulation

• What is a Class?

• Class Object Relationship

• The Person class

• Variable types

• Constructors

• Working with the class Person


Working with Methods

• Method Definitions

• Method Arguments & Return Types

• Overloading Methods

• Method Invocations

• Defining methods

• Constructors Versus Methods

• toString() method

• Adding behaviour to the class Person

• The PersonApp program


Class Inheritance

• Inheritance in Java

• Implementing Inheritance

• Rule for overriding methods

• Rules for Polymorphic variables

• Casting and Inheritance

• The super variable

• Constructors and Inheritance


Abstract Classes, Class Side Behaviour and Final

• Abstract Classes

• Abstract Classes in Java

• Defining an Abstract Class

• Extending an Abstract Class

• Using Concrete Subclasses

• Class Side Information

• Class Side Data

• Class Side Behaviour

• Final Keyword


Java Interfaces and Enumerations

• What is an Interface in Java?

• Basic Interface Definitions

• Implementing an Interface

• Interface

• Using an Interface in a Contract

• Inheritance by Interfaces and Types

• Classes and multiple Interfaces

• Default Interface Methods

• Static Interface Methods

• Enumeration Support

• Implementing Enumerated Types



• Packages

• Class-Package Relationship

• Declaring Packages

• Packaging the Person class

• Role of the Classpath

• JAR Files

• Encapsulation and Packages

• Class modifier

• Constructor Modifier

• Variable Modifier

• Method Modifiers

• Package Summary


Java 9+ Modules

• Introduction the JPMS

• Java Platform Module System

• Why we need modules

• Look at what modules are

• How to define a module

• How to create a single module application

• How to link modules



• What is a Java Array?

• Creating arrays of Objects

• Accessing Array Elements

• Main method args array

• Shorthand form

• Ragged Arrays in Java

• Working with Ragged Arrays

• Implications of Inheritance for Arrays

• Integer Array Example


Java Generics

• Generics and Basic Types

• Generics and Their Types

• Adding Generics to your classes

• A simple user-defined Generic class (the Bag class)

• Type Equality

• Generic Collection Assignment

• Generics and Inheritance


Collections Classes

• Collections API

• ArrayList

• Interfaces vs. Concrete Classes

• HashMap

• Iteration and Enumeration

• Queues

• Generics and Collections

• For Loops

• Boxing and Unboxing

• Raw Collections


Java 9+ Immutable Collections

• Why Immutability?

• Immutability

• List.of Factory method

• Set.of Factory method

• Map.of Factory method

• Immutable Collection Nodes

• Java 10 Enhancement


Error and Exception Handling

• Errors & Exceptions

• Exception types in Java

• Part of the Exception Hierarchy

• Exception Handling

• Local Handling

• Exception Handling Example

• Passing the Buck

• Try with Resources

• Defining new Exceptions

• Chained Exceptions


Nested / Inner Classes

• Four types of Nested / Inner Class

• Properties of Member level inner classes

• Properties of Method Inner classes

• Anonymous Method Inner classes

• Java 11 Nest-based Access


Java Functions

• Functional Programming

• Functional Programming in Java

• Functional Interfaces

• Using Functional Interfaces

• Lambdas in Java

• Closing / Capturing Variables

• Returning Functions

• Combining Functions

• Higher-Order Functions

• Defining Lambdas

• Method References


Java Optional Type

• Null considered Harmful

• Java Optional Type

• Optional Variables

• Creating Optional values

• Method Summary


Java 9 Streams

• Streams

• Streams from Collections

• Terminal / Non Terminal Operators

• Creating a Stream

• Map Operation

• Collectors

• Filter operation

• Sorted operation

• ForEach

• Pipelining Operations

• Parallel Streams

• Not just collections


Files, Paths and IO Streams

• Introducing NIO.2

• Paths class and Path Interface

• The Files class

• File Attributes

• The File Watcher Service

• IO Streams

• Scanners


By the end of this course, you will have:

• Learnt about Java class and Objects

• Explored defining methods and properties

• Examined Class Inheritance

• Understood Java Interfaces and Enumerations

• Considered how to use Packages and Modules

• Learnt about Functional Programming in Java

• Understood how to handle Errors and Exceptions

• Worked with Files, paths and Stream IO

• Used the new Streams API for processing data

• Explored the Collection classes

Certification Back to Top

This Java Programming Basics training course will help the participant to master the Java Programming language. As a part of this Java Programming Basics training, the participants will master the Java programming language.

In Java Programming Basics Course module, the participants understand that Java programming language is used to improve the coding quality. In the Java Programming Basics course, the participants will learn to deal with object-oriented approach, dynamic class, reusable code.

The Java Developer get trained in writing code with less bugs. Java Programming Basics tutorial helps the participants to fulfil the role of a Java Developer. Java Programming Basics training course requires none of any prerequisite.

Java Programming Basics is a language that an emerging developer need to know well. The Java Programming Basics training course from Uplatz can help the participants to understand the java coding is applied in billing software, e-commerce shops, banking and other transaction services. The Java Programming Basics training course validates whether the participants has proven basic knowledge of java programming language. The Java Programming Basics training course helps the participants to create and maintain applications, software and other management services.

Uplatz online training ensures the participants to successfully go through the Java Programming Basics training course. Uplatz provides appropriate teaching and expertise training is provided to equip the participants for implementing the learnt concepts in an enterprise.

Course Completion Certificate will be awarded by Uplatz upon the completion of the Java programming basics course training.

Career & Jobs Back to Top

The Java Developer draws an average salary of $104,264 per year depending on the knowledge and hands-on experience. The Java Developer job roles are in high demand and make a promising career.

The Java Developers have huge demand across various MNC’s. The importance of Java and object-oriented technology in various companies can open up good job opportunities. The leading companies hire Java Developer considering their skill of mastering Java programming and create application or software. The Participants earn Java Programming Basics training through our course completion certificate.

The Java Programming Basics course is ideally designed for programmers and those who aspire to build their career in Java programming.

After pursuing Java Programming Basics course the participants can pursue a wide range of career paths.

The following are the job titles:

·       Java Programmer/Developer

·       Software Developer

·       Application Developer

·       Software Programmer 

Java Programming Basics Training course is worth for any Java or other developers to improve their programming skills.

Interview Questions Back to Top

Q #1) What is JAVA?

Answer: Java is a high-level programming language and is platform-independent.

Java is a collection of objects. It was developed by Sun Microsystems. There are a lot of applications, websites, and games that are developed using Java.


Q #2) What are the features in JAVA?

Answer: Features of Java are as follows:

·       OOPs concepts

·       Object-oriented

·       Inheritance

·       Encapsulation

·       Polymorphism

·       Abstraction

  • Platform independent: A single program works on different platforms without any modification.
  • High Performance: JIT (Just In Time compiler) enables high performance in Java. JIT converts the bytecode into machine language and then JVM starts the execution.
  • Multi-threaded: A flow of execution is known as a Thread. JVM creates a thread which is called the main thread. The user can create multiple threads by extending the thread class or by implementing the Runnable interface.


Q #3) How does Java enable high performance?

Answer: Java uses Just In Time compiler to enable high performance. It is used to convert the instructions into bytecodes.


Q #4) Name the Java IDEs?

Answer: Eclipse and NetBeans are the IDEs of JAVA.


Q #5) What do you mean by Constructor?

Answer: Constructor can be explained in detail with enlisted points:

  • When a new object is created in a program a constructor gets invoked corresponding to the class.
  • The constructor is a method which has the same name as the class name.
  • If a user doesn’t create a constructor implicitly a default constructor will be created.
  • The constructor can be overloaded.
  • If the user created a constructor with a parameter then he should create another constructor explicitly without a parameter.


Q #6) What is meant by the Local variable and the Instance variable?


Local variables are defined in the method and scope of the variables existed inside the method itself.

Instance variable is defined inside the class and outside the method and the scope of the variables exists throughout the class.


Q #7) What is a Class?

Answer: All Java codes are defined in a Class. It has variables and methods.

Variables are attributes which define the state of a class.

Methods are the place where the exact business logic has to be done. It contains a set of statements (or) instructions to satisfy the particular requirement.


public class Addition{ //Class name declaration

int a = 5; //Variable declaration

int b= 5;

public void add(){ //Method declaration

int c = a+b;




Q #8) What is an Object?

Answer: An instance of a class is called an object. The object has state and behavior.

Whenever the JVM reads the “new()” keyword then it will create an instance of that class.


public class Addition{

public static void main(String[] args){

Addion add = new Addition();//Object creation



The above code creates the object for the Addition class.


Q #9)What are the OOPs concepts?

Answer: OOPs concepts include:

  • Inheritance
  • Encapsulation
  • Polymorphism
  • Abstraction
  • Interface


Q #10) What is Inheritance?

Answer: Inheritance means one class can extend to another class. So that the codes can be reused from one class to another class. The existing class is known as the Super class whereas the derived class is known as a sub class.


Super class:

public class Manupulation(){


Sub class:

public class Addition extends Manipulation(){


Inheritance is applicable for public and protected members only. Private members can’t be inherited.


Q #11) What is Encapsulation?

Answer: Purpose of Encapsulation:

  • Protects the code from others.
  • Code maintainability.


We are declaring ‘a' as an integer variable and it should not be negative.

public class Addition(){

int a=5;


If someone changes the exact variable as “a = -5” then it is bad.

In order to overcome the problem we need to follow the below steps:

  • We can make the variable as private or protected one.
  • Use public accessor methods such as set and get.

So that the above code can be modified as:

public class Addition(){

private int a = 5; //Here the variable is marked as private


The below code shows the getter and setter.

Conditions can be provided while setting the variable.

get A(){


set A(int a){

if(a>0){// Here condition is applied




For encapsulation, we need to make all the instance variables as private and create setter and getter for those variables. Which in turn will force others to call the setters rather than access the data directly.


Q #12) What is Polymorphism?

Answer: Polymorphism means many forms.

A single object can refer to the super-class or sub-class depending on the reference type which is called polymorphism.


Public class Manipulation(){ //Super class

public void add(){



public class Addition extends Manipulation(){ // Sub class

public void add(){


public static void main(String args[]){

Manipulation addition = new Addition();//Manipulation is reference type and Addition is reference type




Using Manipulation reference type we can call the Addition class “add()” method. This ability is known as Polymorphism. Polymorphism is applicable for overriding and not for overloading.


Q #13) What is meant by Method Overriding?

Answer: Method overriding happens if the sub-class method satisfies the below conditions with the Super-class method:

  • Method name should be the same
  • The argument should be the same
  • Return type also should be the same

The key benefit of overriding is that the Sub-class can provide some specific information about that sub-class type than the super-class.


public class Manipulation{ //Super class

public void add(){





Public class Addition extends Manipulation(){

Public void add(){



Public static void main(String args[]){

Manipulation addition = new Addition(); //Polimorphism is applied

addition.add(); // It calls the Sub class add() method



addition.add() method calls the add() method in the Sub-class and not the parent class. So it overrides the Super-class method and is known as Method Overriding.


Q #14) What is meant by Overloading?

Answer: Method overloading happens for different classes or within the same class.

For method overloading, sub-class method should satisfy the below conditions with the Super-class method (or) methods in the same class itself:

  • Same method name
  • Different argument type
  • May have different return types


public class Manipulation{ //Super class

public void add(String name){ //String parameter





Public class Addition extends Manipulation(){

Public void add(){//No Parameter



Public void add(int a){ //integer parameter



Public static void main(String args[]){

Addition addition = new Addition();




Here the add() method has different parameters in the Addition class is overloaded in the same class as well as with the super-class.

Note: Polymorphism is not applicable for method overloading.


Q #15) What is meant by Interface?

Answer: Multiple inheritances cannot be achieved in java. To overcome this problem Interface concept is introduced.

An interface is a template which has only method declarations and not the method implementation.


Public abstract interface IManupulation{ //Interface declaration

Public abstract void add();//method declaration

public abstract void subtract();


  • All the methods in the interface are internally public abstract void.
  • All the variables in the interface are internally public static final that is constants.
  • Classes can implement the interface and not extends.
  • The class which implements the interface should provide an implementation for all the methods declared in the interface.

public class Manupulation implements IManupulation{ //Manupulation class uses the interface

Public void add(){



Public void subtract(){





Q #16) What is meant by Abstract class?

Answer: We can create the Abstract class by using the “Abstract” keyword before the class name. An abstract class can have both “Abstract” methods and “Non-abstract” methods that are a concrete class.

Abstract method:

The method which has only the declaration and not the implementation is called the abstract method and it has the keyword called “abstract”. Declarations are the ends with a semicolon.


public abstract class Manupulation{

public abstract void add();//Abstract method declaration

Public void subtract(){



  • An abstract class may have a non- abstract method also.
  • The concrete Subclass which extends the Abstract class should provide the implementation for abstract methods.


Q #17) Difference between Array and Array List.

Answer: The Difference between Array and Array List can be understood from the below table:



   Array List    


Size should be given at the time of array declaration.

String[] name = new String[2]

Size may not be required. It changes the size dynamically.

ArrayList name = new ArrayList

To put an object into array we need to specify the index.

name[1] = “book”

No index required.


Array is not type parameterized

ArrayList in java 5.0 are parameterized.

Eg: This angle bracket is a type parameter which means a list of String.


Q #18) Difference between String, String Builder, and String Buffer.


String: String variables are stored in a “constant string pool”. Once the string reference changes the old value that exists in the “constant string pool”, it cannot be erased.


String name = “book”;

Constant string pool

If the name-value has changed from “book” to “pen”.

Constant string pool

Then the older value retains in the constant string pool.

String Buffer:

  • Here string values are stored in a stack. If the values are changed then the new value replaces the older value.
  • The string buffer is synchronized which is thread-safe.
  • Performance is slower than the String Builder.


String Buffer name =”book”;

Once the name value has been changed to “pen” then the “book” is erased in the stack.

String Builder:

This is the same as String Buffer except for the String Builder which is not threaded safety that is not synchronized. So obviously performance is fast.


Q #19) Explain about Public and Private access specifiers.

Answer: Methods and instance variables are known as members.


Public members are visible in the same package as well as the outside package that is for other packages.

Public members in Class A are visible to Class B (same package) as well as Class C (different packages).


Private members are visible in the same class only and not for the other classes in the same package as well as classes in the outside packages.

Private members in class A are visible only in that class. It is invisible for class  B as well as class C.


Q #20) Difference between Default and Protected access specifiers.


Default: Methods and variables declared in a class without any access specifiers are called default.

Default members in Class A are visible to the other classes which are inside the package and invisible to the classes which are outside the package.

So Class A members are visible to the Class B and invisible to the Class C.


Protected is the same as Default but if a class extends then it is visible even if it is outside the package.

Class A members are visible to Class B because it is inside the package. For Class C it is invisible but if Class C extends Class A then the members are visible to the Class C even if it is outside the package.


Q #21) Difference between HashMap and HashTable.

Answer: Difference between HashMap and HashTable can be seen below:




Methods are not synchronized

Key methods are synchronized

Not thread safety

Thread safety

Iterator is used to iterate the values

Enumerator is used to iterate the values

Allows one null key and multiple null values

Doesn’t allow anything that is null

Performance is high than HashTable

Performance is slow


Q #22) Difference between HashSet and TreeSet.

Answer: Difference between HashSet and TreeSet can be seen below:




Inserted elements are in random order

Maintains the elements in the sorted order

Can able to store null objects

Couldn’t store null objects

Performance is fast

Performance is slow


Q #23) Difference between Abstract class and Interface.

Answer: Difference between Abstract Class and Interface are as follows:

Abstract Class:

  • Abstract classes have a default constructor and it is called whenever the concrete subclass is instantiated.
  • It contains Abstract methods as well as Non-Abstract methods.
  • The class which extends the Abstract class shouldn’t require the implementation of all the methods, only Abstract methods need to be implemented in the concrete sub-class.
  • Abstract class contains instance variables.


  • It doesn’t have any constructor and couldn’t be instantiated.
  • The abstract method alone should be declared.
  • Classes that implement the interface should provide the implementation for all the methods.
  • The interface contains only constants.


Q #24)  What is mean by Collections in Java?

Answer: Collection is a framework that is designed to store the objects and manipulate the design to store the objects.

Collections are used to perform the following operations:

  • Searching
  • Sorting
  • Manipulation
  • Insertion
  • Deletion

A group of objects is known as collections. All the classes and interfaces for collecting are available in Java util package.


Q #25) What are all the Classes and Interfaces that are available in the collections?

Answer: Given below are the Classes and Interfaces that are available in Collections:


  • Collection
  • List
  • Set
  • Map
  • Sorted Set
  • Sorted Map
  • Queue


  • Lists:
  • Array List
  • Vector
  • Linked List


  • Hash set
  • Linked Hash Set
  • Tree Set


  • Hash Map
  • Hash Table
  • TreeMap
  • Linked Hashed Map


  • Priority Queue


Q #26) What is meant by Ordered and Sorted in collections?


Ordered: It means the values that are stored in a collection is based on the values that are added to the collection. So we can iterate the values from the collection in a specific order.

Sorted: Sorting mechanisms can be applied internally or externally so that the group of objects sorted in a particular collection is based on the properties of the objects.


Q #27) Explain the different lists available in the collection.

Answer: Values added to the list is based on the index position and it is ordered by index position. Duplicates are allowed.

Types of Lists are:

a) Array List:

  • Fast iteration and fast Random Access.
  • It is an ordered collection (by index) and not sorted.
  • It implements the Random Access Interface.


public class Fruits{

public static void main (String [ ] args){

ArrayList names=new ArrayList ();

names.add (“apple”);

names.add (“cherry”);

names.add (“kiwi”);

names.add (“banana”);

names.add (“cherry”);

System.out.println (names);




[Apple, cherry, kiwi, banana, cherry]

From the output, Array List maintains the insertion order and it accepts the duplicates. But not sorted.

b) Vector:

It is the same as Array List.

  • Vector methods are synchronized.
  • Thread safety.
  • It also implements the Random Access.
  • Thread safety usually causes a performance hit.


public class Fruit {

public static void main (String [ ] args){

Vector names = new Vector ( );

 names.add (“cherry”);

names.add (“apple”);

names.add (“banana”);

names.add (“kiwi”);

names.add (“apple”);

System.out.println (“names”);





Vector also maintains the insertion order and accepts the duplicates.

c) Linked List:

  • Elements are doubly linked to one another.
  • Performance is slower than the Array list.
  • Good choice for insertion and deletion.
  • In Java 5.0 it supports common queue methods peek( ), Pool ( ), Offer ( ) etc.


public class Fruit {

public static void main (String [ ] args){

Linkedlist names = new linkedlist ( ) ;






System.out.println (names);




[ banana,cherry,apple,kiwi,banana]

Maintains the insertion order and accepts the duplicates.


Q #28) Explain about Set and their types in a collection?

Answer: Set cares about uniqueness. It doesn’t allow duplications. Here “equals ( )” method is used to determine whether two objects are identical or not.

a) Hash Set:

  • Unordered and unsorted.
  • Uses the hash code of the object to insert the values.
  • Use this when the requirement is “no duplicates and don’t care about the order”.


public class Fruit {

public static void main (String[ ] args){

HashSet names = new HashSet <=String>( ) ;






System.out.println (names);




[banana, cherry, kiwi, apple]

It doesn’t follow any insertion order. Duplicates are not allowed.

b) Linked Hash set:

  • An ordered version of the hash set is known as Linked Hash Set.
  • Maintains a doubly-Linked list of all the elements.
  • Use this when the iteration order is required.


public class Fruit {

public static void main (String[ ] args){

LinkedHashSet; names = new LinkedHashSet ( ) ;






 System.out.println (names);




[banana, cherry, apple, kiwi]

It maintains the insertion order in which they have been added to the Set. Duplicates are not allowed.

c) Tree Set:

  • It is one of the two sorted collections.
  • Uses the “Read-Black” tree structure and guarantee that the elements will be in ascending order.
  • We can construct a tree set with the constructor by using a comparable (or) comparator.


public class Fruits{

public static void main (String[ ]args) {

Treeset names= new TreeSet( ) ;










[apple, banana, cherry, kiwi]

TreeSet sorts the elements in ascending order. And duplicates are not allowed.


Q #29). Explain about Map and their types.

Answer: Map cares about the unique identifier. We can map a unique key to a specific value. It is a key/value pair. We can search a value, based on the key. Like the set, Map also uses the “equals ( )” method to determine whether two keys are the same or different.

Map is of following types:

a) Hash Map:

  • Unordered and unsorted map.
  • Hashmap is a good choice when we don’t care about the order.
  • It allows one null key and multiple null values.


Public class Fruit{

Public static void main(String[ ] args){

HashMap<Sting,String> names =new HashMap<String,String>( );


names.put (“key2”,“banana”);

names.put (“key3”,“apple”);

names.put (“key4”,“kiwi”);

names.put (“key1”,“cherry”);





{key2 =banana, key1=cherry, key4 =kiwi, key3= apple}

Duplicate keys are not allowed in Map.

It doesn’t maintain any insertion order and is unsorted.

b) Hash Table:

  • Like the vector key, methods of the class are synchronized.
  • Thread safety and therefore slows the performance.
  • It doesn’t allow anything that is null.


public class Fruit{

public static void main(String[ ]args){

Hashtable<Sting,String> names =new Hashtable<String,String>( );










{key2=apple, key1=cherry,key4=kiwi, key3=banana}

Duplicate keys are not allowed.

c) Linked Hash Map:

  • Maintains insertion order.
  • Slower than Hash map.
  • I can expect a faster iteration.


public class Fruit{

public static void main(String[ ] args){

LinkedHashMap<Sting,String> names =new LinkedHashMap<String,String>( );










{key2=apple, key1=cherry,key4=kiwi, key3=banana}

Duplicate keys are not allowed.

d) TreeMap:

  • Sorted Map.
  • Like Tree set, we can construct a sort order with the constructor.


public class Fruit{

public static void main(String[ ]args){

TreeMap<Sting,String> names =new TreeMap<String,String>( );










{key1=cherry, key2=banana, key3 =apple, key4=kiwi}

It is sorted in ascending order based on the key. Duplicate keys are not allowed.


Q #30) Explain the Priority Queue.

Answer: Queue Interface

Priority Queue: Linked list class has been enhanced to implement the queue interface. Queues can be handled with a linked list. The purpose of a queue is “Priority-in, Priority-out”.

Hence elements are ordered either naturally or according to the comparator. The elements ordering represents their relative priority.


Q #31) What is meant by Exception?

Answer: An Exception is a problem that can occur during the normal flow of execution. A method can throw an exception when something wails at runtime. If that exception couldn’t be handled, then the execution gets terminated before it completes the task.

If we handled the exception, then the normal flow gets continued. Exceptions are a subclass of java.lang.Exception.


Q #32) What are the types of Exceptions?

Answer: There are two types of Exceptions. They are explained below in detail.

a) Checked Exception:

These exceptions are checked by the compiler at the time of compilation. Classes that extend Throwable class except Runtime exception and Error are called checked Exception.

Checked Exceptions must either declare the exception using throws keyword (or) surrounded by appropriate try/catch.

For Example, ClassNotFound Exception

b) Unchecked Exception:

These exceptions are not checked during the compile time by the compiler.  The compiler doesn’t force to handle these exceptions. It includes:

• Arithmetic Exception


• ArrayIndexOutOfBounds Exception


Q #33) What are the advantages of Exception handling?

Answer: The advantages are as follows:

• The normal flow of the execution won’t be terminated if exception got handled

• We can identify the problem by using catch declaration


Q #34) What is the final keyword in Java?


Final variable: Once a variable is declared as final, then the value of the variable could not be changed. It is like a constant.


final int = 12;

Final method: A final keyword in a method, couldn’t be overridden. If a method is marked as a final, then it can’t be overridden by the subclass.

Final class: If a class is declared as final, then the class couldn’t be subclassed. No class can extend the final class.

Course Quiz Back to Top
Start Quiz
Q1. What are the payment options?
A1. We have multiple payment options: 1) Book your course on our webiste by clicking on Buy this course button on top right of this course page 2) Pay via Invoice using any credit or debit card 3) Pay to our UK or India bank account 4) If your HR or employer is making the payment, then we can send them an invoice to pay.

Q2. Will I get certificate?
A2. Yes, you will receive course completion certificate from Uplatz confirming that you have completed this course with Uplatz. Once you complete your learning please submit this for to request for your certificate https://training.uplatz.com/certificate-request.php

Q3. How long is the course access?
A3. All our video courses comes with lifetime access. Once you purchase a video course with Uplatz you have lifetime access to the course i.e. forever. You can access your course any time via our website and/or mobile app and learn at your own convenience.

Q4. Are the videos downloadable?
A4. Video courses cannot be downloaded, but you have lifetime access to any video course you purchase on our website. You will be able to play the videos on our our website and mobile app.

Q5. Do you take exam? Do I need to pass exam? How to book exam?
A5. We do not take exam as part of the our training programs whether it is video course or live online class. These courses are professional courses and are offered to upskill and move on in the career ladder. However if there is an associated exam to the subject you are learning with us then you need to contact the relevant examination authority for booking your exam.

Q6. Can I get study material with the course?
A6. The study material might or might not be available for this course. Please note that though we strive to provide you the best materials but we cannot guarantee the exact study material that is mentioned anywhere within the lecture videos. Please submit study material request using the form https://training.uplatz.com/study-material-request.php

Q7. What is your refund policy?
A7. Please refer to our Refund policy mentioned on our website, here is the link to Uplatz refund policy https://training.uplatz.com/refund-and-cancellation-policy.php

Q8. Do you provide any discounts?
A8. We run promotions and discounts from time to time, we suggest you to register on our website so you can receive our emails related to promotions and offers.

Q9. What are overview courses?
A9. Overview courses are 1-2 hours short to help you decide if you want to go for the full course on that particular subject. Uplatz overview courses are either free or minimally charged such as GBP 1 / USD 2 / EUR 2 / INR 100

Q10. What are individual courses?
A10. Individual courses are simply our video courses available on Uplatz website and app across more than 300 technologies. Each course varies in duration from 5 hours uptop 150 hours. Check all our courses here https://training.uplatz.com/online-it-courses.php?search=individual

Q11. What are bundle courses?
A11. Bundle courses offered by Uplatz are combo of 2 or more video courses. We have Bundle up the similar technologies together in Bundles so offer you better value in pricing and give you an enhaced learning experience. Check all Bundle courses here https://training.uplatz.com/online-it-courses.php?search=bundle

Q12. What are Career Path programs?
A12. Career Path programs are our comprehensive learning package of video course. These are combined in a way by keeping in mind the career you would like to aim after doing career path program. Career path programs ranges from 100 hours to 600 hours and covers wide variety of courses for you to become an expert on those technologies. Check all Career Path Programs here https://training.uplatz.com/online-it-courses.php?career_path_courses=done

Q13. What are Learning Path programs?
A13. Learning Path programs are dedicated courses designed by SAP professionals to start and enhance their career in an SAP domain. It covers from basic to advance level of all courses across each business function. These programs are available across SAP finance, SAP Logistics, SAP HR, SAP succcessfactors, SAP Technical, SAP Sales, SAP S/4HANA and many more Check all Learning path here https://training.uplatz.com/online-it-courses.php?learning_path_courses=done

Q14. What are Premium Career tracks?
A14. Premium Career tracks are programs consisting of video courses that lead to skills required by C-suite executives such as CEO, CTO, CFO, and so on. These programs will help you gain knowledge and acumen to become a senior management executive.

Q15. How unlimited subscription works?
A15. Uplatz offers 2 types of unlimited subscription, Monthly and Yearly. Our monthly subscription give you unlimited access to our more than 300 video courses with 6000 hours of learning content. The plan renews each month. Minimum committment is for 1 year, you can cancel anytime after 1 year of enrolment. Our yearly subscription gives you unlimited access to our more than 300 video courses with 6000 hours of learning content. The plan renews every year. Minimum committment is for 1 year, you can cancel the plan anytime after 1 year. Check our monthly and yearly subscription here https://training.uplatz.com/online-it-courses.php?search=subscription

Q16. Do you provide software access with video course?
A16. Software access can be purchased seperately at an additional cost. The cost varies from course to course but is generally in between GBP 20 to GBP 40 per month.

Q17. Does your course guarantee a job?
A17. Our course is designed to provide you with a solid foundation in the subject and equip you with valuable skills. While the course is a significant step toward your career goals, its important to note that the job market can vary, and some positions might require additional certifications or experience. Remember that the job landscape is constantly evolving. We encourage you to continue learning and stay updated on industry trends even after completing the course. Many successful professionals combine formal education with ongoing self-improvement to excel in their careers. We are here to support you in your journey!

Q18. Do you provide placement services?
A18. While our course is designed to provide you with a comprehensive understanding of the subject, we currently do not offer placement services as part of the course package. Our main focus is on delivering high-quality education and equipping you with essential skills in this field. However, we understand that finding job opportunities is a crucial aspect of your career journey. We recommend exploring various avenues to enhance your job search:
a) Career Counseling: Seek guidance from career counselors who can provide personalized advice and help you tailor your job search strategy.
b) Networking: Attend industry events, workshops, and conferences to build connections with professionals in your field. Networking can often lead to job referrals and valuable insights.
c) Online Professional Network: Leverage platforms like LinkedIn, a reputable online professional network, to explore job opportunities that resonate with your skills and interests.
d) Online Job Platforms: Investigate prominent online job platforms in your region and submit applications for suitable positions considering both your prior experience and the newly acquired knowledge. e.g in UK the major job platforms are Reed, Indeed, CV library, Total Jobs, Linkedin.
While we may not offer placement services, we are here to support you in other ways. If you have any questions about the industry, job search strategies, or interview preparation, please dont hesitate to reach out. Remember that taking an active role in your job search process can lead to valuable experiences and opportunities.

Q19. How do I enrol in Uplatz video courses?
A19. To enroll, click on "Buy This Course," You will see this option at the top of the page.
a) Choose your payment method.
b) Stripe for any Credit or debit card from anywhere in the world.
c) PayPal for payments via PayPal account.
d) Choose PayUmoney if you are based in India.
e) Start learning: After payment, your course will be added to your profile in the student dashboard under "Video Courses".

Q20. How do I access my course after payment?
A20. Once you have made the payment on our website, you can access your course by clicking on the "My Courses" option in the main menu or by navigating to your profile, then the student dashboard, and finally selecting "Video Courses".

Q21. Can I get help from a tutor if I have doubts while learning from a video course?
A21. Tutor support is not available for our video course. If you believe you require assistance from a tutor, we recommend considering our live class option. Please contact our team for the most up-to-date availability. The pricing for live classes typically begins at USD 999 and may vary.