0% found this document useful (0 votes)
23 views4 pages

JAVA

The document discusses various Java concepts including methods, method overloading, overriding, OOP, classes, attributes, constructors, modifiers, encapsulation, inheritance, polymorphism, abstraction, interfaces, collections, lists, array lists, linked lists, iterators, sets, hash sets, queues, maps, hash maps.

Uploaded by

guna
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
23 views4 pages

JAVA

The document discusses various Java concepts including methods, method overloading, overriding, OOP, classes, attributes, constructors, modifiers, encapsulation, inheritance, polymorphism, abstraction, interfaces, collections, lists, array lists, linked lists, iterators, sets, hash sets, queues, maps, hash maps.

Uploaded by

guna
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

JAVA

METHODS

➢ Method is a block of code which only runs when it is called.

➢ You can pass data, known as parameters, into a method.

METHOD OVERLOADING

➢ When two or more methods in the same class have the same name but different
parameters, it’s called overloading.

METHOD OVERRIDING

➢ Method overriding occurs when a subclass (child class) has the same method as
the parent class.

OOP

➢ Object-oriented programming is about creating objects that contain both data and
methods.

CLASS

➢ Template to create objects that share common properties and methods.

ATTRIBUTE

➢ An attribute defines a particular property of an object.

CONSTRUCTORS

➢ Special method that is used to initialize objects.

➢ The constructor is called when an object of a class is created.

➢ It can be used to set initial values for object attributes.

MODIFIERS

➢ Set the access level for classes, attributes, methods and constructors.

➢ Access Modifiers - controls the access level.

➢ Non-Access Modifiers - do not control access level, but provides other


functionality.

ENCAPSULATION

➢ "Sensitive" data is hidden from users.(GET and SET).


JAVA

INHERITANCE

➢ Creating new classes based on existing ones. A class that inherits from another
class can reuse the methods.

POLYMORPHISM

➢ "Many forms", and it occurs when we have many classes that are related to each
other by inheritance.

ABSTRACTION

➢ Hiding certain details and showing only essential information to the user.

INTERFACE

➢ Specifies the behaviour of a class by providing an abstract type.

COLLECTION

➢ To represent group of individuals objects as a single entity.

COLLECTIONS

➢ It is a utility class to define several utility methods.

COLLECTION INTERFACE

➢ It defines the most common methods which is applicable for any collection object.

➢ used to pass around collections of objects where maximum generality is desired.

COLLECTION FRAMEWORKS

➢ It defines several classes and interfaces which can be used a group of individuals
objects as a single entity

List

➢ Duplicates are allowed

➢ Insertion order preserved

ARRAY LIST

➢ The ArrayList class is a resizable array, which can be found in the java.util
package.

➢ add or remove elements ,best choice for retrieval.


JAVA

LINKED LIST

➢ The LinkedList class is a collection which can contain many objects of the same
type, just like the ArrayList.

➢ best choice for insertion and deletion.

➢ set an ArrayList for storing and accessing data, and LinkedList to


manipulate data.

ITERATOR

➢ To retrieve objects one by one.

➢ Read and remove, forward direction.

ENUMERATION

➢ We can get only read access and can’t perform remove operation.

List iterator

➢ Forward and backward, read and remove.

SET

➢ Duplicates are not allowed

➢ Insertion order not preserved

SORTED SET

➢ Duplicates are not allowed

➢ Insertion order preserved

HASH SET

➢ A HashSet is a collection of items where every item is unique.

OUEUE

➢ To represent group of individuals objects prior to processing.

MAP

➢ To represent group of individuals objects as key value pairs

SORTED MAP

➢ To represent group of individuals objects as key value pairs according to sorting


order.
JAVA

Vector and Stack

➢ Vector-Resizable and growable, Synchronized.

➢ Stack-Child class of vector/LIFO.

Random Access

➢ It doesn’t contain any methods and it is a marker interface

HASH MAP

➢ Store items in "key/value" pairs.

You might also like