SlideShare a Scribd company logo
Java.util Package
Java.util package contains the collections
framework, legacy collection classes, event
model, date and time facilities,
internationalization, and miscellaneous
utility classes.
ArrayDeque
• 1. ArrayDeque implements Deque interface
and ArrayDeque are available from jdk1.6.
2. Deque is that queue which allows insert and
remove of elements from both sides.
3. ArrayDeque is not thread safe. ArrayDeque
allows unlimited insertion of elements.
Constructor & Description
• ArrayDeque()
• This constructor is used to create an empty array
deque with an initial capacity sufficient to hold 16
elements.
• ArrayDeque(Collection<? extends E> c)
• This constructor is used to create a deque containing
the elements of the specified collection.
• ArrayDeque(int numElements)
• This constructor is used to create an empty array
deque with an initial capacity sufficient to hold the
specified number of elements.
• boolean add(E e)
• This method inserts the specified element at the end of this deque.
• void addFirst(E e)
• This method inserts the specified element at the front of this deque.
• void addLast(E e)
• This method inserts the specified element at the end of this deque.
• void clear()
• This method removes all of the elements from this deque.
• ArrayDeque<E> clone()
• This method returns a copy of this deque.
• boolean contains(Object o)
• This method returns true if this deque contains the specified element.
• The java.util.ArrayList class provides resizable-array
and implements theList interface.Following are the
important points about ArrayList:
• ArrayList class can contain duplicate elements.
• ArrayList class maintains insertion order.
• ArrayList class is non synchronized.
• ArrayList allows random access because array works at
the index basis.
• ArrayList class uses a dynamic array for storing the
elements.It extends AbstractList class and implements
List interface.
• The java.util.Arrays class contains a static factory
that allows arrays to be viewed as lists.Following
are the important points about Arrays:
• This class contains various methods for
manipulating arrays (such as sorting and
searching).
• The methods in this class throw a
NullPointerException if the specified array
reference is null.
• public class Arrays extends Object
• The java.util.BitSet class implements a vector of bits that grows as
needed.Following are the important points about BitSet:
• A BitSet is not safe for multithreaded use without external
synchronization.
• All bits in the set initially have the value false.
• Passing a null parameter to any of the methods in a BitSet will
result in a NullPointerException.
• BitSet()
• This constructor creates a new bit set.
• BitSet(int nbits)
• This constructor creates a bit set whose initial size is large enough
to explicitly represent bits with indices in the range 0 through nbits-
1.
• The java.util.calendar class is an abstract class that provides
methods for converting between a specific instant in time and a set
of calendar fields such as YEAR, MONTH, DAY_OF_MONTH, HOUR,
and so on, and for manipulating the calendar fields, such as getting
the date of the next week.
• public abstract class Calendar extends Object implements
Serializable, Cloneable, Comparable<Calendar>
• protected Calendar()
• This constructor constructs a Calendar with the default time zone
and locale.
• protected Calendar(TimeZone zone, Locale aLocale)
• This constructor constructs a calendar with the specified time zone
and locale.
• The java.util.Dictionary class is the abstract parent of any class, such as Hashtable,
which maps keys to values.Following are the important points about Dictionary:
• java.util.Dictionary class every key and every value is an object.
• java.util.Dictionary object every key is associated with at most one value.
• public abstract class Dictionary<K,V> extends Object
• Dictionary()
• This is the single constructor.
• abstract Enumeration<V> elements()
• This method returns an enumeration of the values in this dictionary.
• abstract V get(Object key)
• This method returns the value to which the key is mapped in this dictionary.
• abstract boolean isEmpty()
• This method tests if this dictionary maps no keys to value.
• abstract Enumeration<K> keys()
• This method returns an enumeration of the keys in this dictionary.
• abstract int size()
• This method returns the number of entries (distinct keys) in this dictionary.
• etc…
• The java.util.EnumMap class is a specialized Map
implementation for use with enum keys.Following are the
important points about EnumMap:
• All of the keys in an enum map must come from a single
enum type that is specified, explicitly or implicitly, when
the map is created.
• Enum maps are maintained in the natural order of their
keys.
• EnumMap is not synchronized.If multiple threads access an
enum map concurrently, and at least one of the threads
modifies the map, it should be synchronized externally.
• public class EnumMap<K extends Enum<K>,V> extends
AbstractMap<K,V> implements Serializable, Cloneable
• EnumMap(Class<K> keyType)
• This constructor creates an empty enum map with the
HashMap in Java
• HashMap in Java with Example. HashMap maintains
key and value pairs and often denoted
as HashMap<Key, Value> or HashMap<K, V>.
• HashMap implements Map interface.
• HashMap is similar to Hashtable with two exceptions –
HashMap methods are unsynchornized and it allows
null key and null values unlike Hashtable
• A HashMap contains values based on the key. It
implements the Map interface and extends
AbstractMap class.
• It contains only unique elements.
• It may have one null key and multiple null values.
• It maintains no order.
• public class HashMap<K,V> extends AbstractMap<K,V>
• uses hashtable to store the elements.It extends AbstractSet class
and implements Set interface.
• contains unique elements only.
• Difference between List and Set:
• List can contain duplicate elements whereas Set contains unique
elements only.
• public class HashSet<E> extends AbstractSet<E> implements
Set<E>, Cloneable, Serializable
• HashSet()
• This constructs a new, empty set; the backing HashMap instance
has default initial capacity (16) and load factor (0.75).
• HashSet(Collection<? extends E> c)
• This constructs a new set containing the elements in the specified
collection.
• boolean add(E e)
• This method adds the specified element to this set if it is not
already present.
Java LinkedHashSet class
• Java LinkedHashSet class
• contains unique elements only like HashSet. It extends HashSet
class and implements Set interface.
• maintains insertion order.
• The java.util.LinkedHashSet class is a Hash table and Linked list
implementation of the Set interface, with predictable iteration
order.Following are the important points about LinkedHashSet:
• This class provides all of the optional Set operations, and permits
null elements.
• public class LinkedHashSet<E> extends HashSet<E> implements
Set<E>, Cloneable, Serializable
• LinkedHashSet()
• This constructs a new, empty linked hash set with the default initial
capacity (16) and load factor (0.75).
• LinkedHashSet(Collection<? extends E> c)
• This constructs a new linked hash set with the same elements as
the specified collection.
java.util.Properties
• The java.util.Properties class is a class which represents a
persistent set of properties.The Properties can be saved to a stream
or loaded from a stream.Following are the important points about
Properties:
• Each key and its corresponding value in the property list is a string.
• A property list can contain another property list as its 'defaults', this
second property list is searched if the property key is not found in
the original property list.
• This class is thread-safe; multiple threads can share a single
Properties object without the need for external synchronization.
• public class Properties extends Hashtable<Object,Object>
• Advantage of properties file
• Easy Maintenance: If any information is changed from the
properties file, you don't need to recompile the java class. It is
mainly used to contain variable information i.e. to be changed.
• String getProperty(String key)
• This method searches for the property with the specified key in this

More Related Content

What's hot

5 collection framework
5 collection framework5 collection framework
5 collection framework
Minal Maniar
 
Java Collection framework
Java Collection frameworkJava Collection framework
Java Collection framework
ankitgarg_er
 
Collections in Java
Collections in JavaCollections in Java
Collections in Java
Khasim Cise
 
Java Collections Tutorials
Java Collections TutorialsJava Collections Tutorials
Java Collections Tutorials
Prof. Erwin Globio
 
Java collections concept
Java collections conceptJava collections concept
Java collections concept
kumar gaurav
 
Collections Api - Java
Collections Api - JavaCollections Api - Java
Collections Api - Java
Drishti Bhalla
 
Java - Collections framework
Java - Collections frameworkJava - Collections framework
Java - Collections framework
Riccardo Cardin
 
JAVA Collections frame work ppt
 JAVA Collections frame work ppt JAVA Collections frame work ppt
JAVA Collections frame work ppt
Ranjith Alappadan
 
07 java collection
07 java collection07 java collection
07 java collection
Abhishek Khune
 
Java Collections | Collections Framework in Java | Java Tutorial For Beginner...
Java Collections | Collections Framework in Java | Java Tutorial For Beginner...Java Collections | Collections Framework in Java | Java Tutorial For Beginner...
Java Collections | Collections Framework in Java | Java Tutorial For Beginner...
Edureka!
 
Java Collections
Java  Collections Java  Collections
Java Collections Framework Inroduction with Video Tutorial
Java Collections Framework Inroduction with Video TutorialJava Collections Framework Inroduction with Video Tutorial
Java Collections Framework Inroduction with Video Tutorial
Marcus Biel
 
Java Collections Framework
Java Collections FrameworkJava Collections Framework
Java Collections Framework
Sony India Software Center
 
Collections Java e Google Collections
Collections Java e Google CollectionsCollections Java e Google Collections
Collections Java e Google Collections
André Faria Gomes
 
Collections in Java Notes
Collections in Java NotesCollections in Java Notes
Collections in Java Notes
Shalabh Chaudhary
 
Collections In Java
Collections In JavaCollections In Java
Collections In JavaBinoj T E
 
Java collections notes
Java collections notesJava collections notes
Java collections notes
Surendar Meesala
 
Java collection
Java collectionJava collection
Java collection
Arati Gadgil
 
Generics
GenericsGenerics
Java Collections Framework
Java  Collections  FrameworkJava  Collections  Framework
Java Collections Frameworkguestd8c458
 

What's hot (20)

5 collection framework
5 collection framework5 collection framework
5 collection framework
 
Java Collection framework
Java Collection frameworkJava Collection framework
Java Collection framework
 
Collections in Java
Collections in JavaCollections in Java
Collections in Java
 
Java Collections Tutorials
Java Collections TutorialsJava Collections Tutorials
Java Collections Tutorials
 
Java collections concept
Java collections conceptJava collections concept
Java collections concept
 
Collections Api - Java
Collections Api - JavaCollections Api - Java
Collections Api - Java
 
Java - Collections framework
Java - Collections frameworkJava - Collections framework
Java - Collections framework
 
JAVA Collections frame work ppt
 JAVA Collections frame work ppt JAVA Collections frame work ppt
JAVA Collections frame work ppt
 
07 java collection
07 java collection07 java collection
07 java collection
 
Java Collections | Collections Framework in Java | Java Tutorial For Beginner...
Java Collections | Collections Framework in Java | Java Tutorial For Beginner...Java Collections | Collections Framework in Java | Java Tutorial For Beginner...
Java Collections | Collections Framework in Java | Java Tutorial For Beginner...
 
Java Collections
Java  Collections Java  Collections
Java Collections
 
Java Collections Framework Inroduction with Video Tutorial
Java Collections Framework Inroduction with Video TutorialJava Collections Framework Inroduction with Video Tutorial
Java Collections Framework Inroduction with Video Tutorial
 
Java Collections Framework
Java Collections FrameworkJava Collections Framework
Java Collections Framework
 
Collections Java e Google Collections
Collections Java e Google CollectionsCollections Java e Google Collections
Collections Java e Google Collections
 
Collections in Java Notes
Collections in Java NotesCollections in Java Notes
Collections in Java Notes
 
Collections In Java
Collections In JavaCollections In Java
Collections In Java
 
Java collections notes
Java collections notesJava collections notes
Java collections notes
 
Java collection
Java collectionJava collection
Java collection
 
Generics
GenericsGenerics
Generics
 
Java Collections Framework
Java  Collections  FrameworkJava  Collections  Framework
Java Collections Framework
 

Similar to Java util

Java Programming Comprehensive Guide.pptx
Java Programming Comprehensive Guide.pptxJava Programming Comprehensive Guide.pptx
Java Programming Comprehensive Guide.pptx
rangariprajwal4554
 
collection framework.pptx
collection framework.pptxcollection framework.pptx
collection framework.pptx
SoniaKapoor56
 
STRINGS IN JAVA
STRINGS IN JAVASTRINGS IN JAVA
Week_2_Lec_6-10_with_watermarking_(1).pdf
Week_2_Lec_6-10_with_watermarking_(1).pdfWeek_2_Lec_6-10_with_watermarking_(1).pdf
Week_2_Lec_6-10_with_watermarking_(1).pdf
PrabhaK22
 
12_-_Collections_Framework
12_-_Collections_Framework12_-_Collections_Framework
12_-_Collections_FrameworkKrishna Sujeer
 
Java Unit 2 (Part 2)
Java Unit 2 (Part 2)Java Unit 2 (Part 2)
Java Unit 2 (Part 2)
SURBHI SAROHA
 
Collection Framework in Java | Generics | Input-Output in Java | Serializatio...
Collection Framework in Java | Generics | Input-Output in Java | Serializatio...Collection Framework in Java | Generics | Input-Output in Java | Serializatio...
Collection Framework in Java | Generics | Input-Output in Java | Serializatio...
Sagar Verma
 
Java collections
Java collectionsJava collections
Java collectionsSujit Kumar
 
Java 103 intro to java data structures
Java 103   intro to java data structuresJava 103   intro to java data structures
Java 103 intro to java data structures
agorolabs
 
Collections lecture 35 40
Collections lecture 35 40Collections lecture 35 40
Collections lecture 35 40
bhawna sharma
 
JAVA(UNIT 4)
JAVA(UNIT 4)JAVA(UNIT 4)
JAVA(UNIT 4)
SURBHI SAROHA
 
Collection framework (completenotes) zeeshan
Collection framework (completenotes) zeeshanCollection framework (completenotes) zeeshan
Collection framework (completenotes) zeeshan
Zeeshan Khan
 
Java collections
Java collectionsJava collections
Java collectionspadmad2291
 
Java collections
Java collectionsJava collections
Java collections
Hamid Ghorbani
 
How to choose best containers in STL (C++)
How to choose best containers in STL (C++)How to choose best containers in STL (C++)
How to choose best containers in STL (C++)
Sangharsh agarwal
 
Collections - Lists & sets
Collections - Lists & setsCollections - Lists & sets
Collections - Lists & sets
RatnaJava
 

Similar to Java util (20)

Java Programming Comprehensive Guide.pptx
Java Programming Comprehensive Guide.pptxJava Programming Comprehensive Guide.pptx
Java Programming Comprehensive Guide.pptx
 
collection framework.pptx
collection framework.pptxcollection framework.pptx
collection framework.pptx
 
STRINGS IN JAVA
STRINGS IN JAVASTRINGS IN JAVA
STRINGS IN JAVA
 
Week_2_Lec_6-10_with_watermarking_(1).pdf
Week_2_Lec_6-10_with_watermarking_(1).pdfWeek_2_Lec_6-10_with_watermarking_(1).pdf
Week_2_Lec_6-10_with_watermarking_(1).pdf
 
12_-_Collections_Framework
12_-_Collections_Framework12_-_Collections_Framework
12_-_Collections_Framework
 
Java Unit 2 (Part 2)
Java Unit 2 (Part 2)Java Unit 2 (Part 2)
Java Unit 2 (Part 2)
 
Collection Framework in Java | Generics | Input-Output in Java | Serializatio...
Collection Framework in Java | Generics | Input-Output in Java | Serializatio...Collection Framework in Java | Generics | Input-Output in Java | Serializatio...
Collection Framework in Java | Generics | Input-Output in Java | Serializatio...
 
Javasession7
Javasession7Javasession7
Javasession7
 
Java collections
Java collectionsJava collections
Java collections
 
Java 103 intro to java data structures
Java 103   intro to java data structuresJava 103   intro to java data structures
Java 103 intro to java data structures
 
Md08 collection api
Md08 collection apiMd08 collection api
Md08 collection api
 
Java collections
Java collectionsJava collections
Java collections
 
Collections lecture 35 40
Collections lecture 35 40Collections lecture 35 40
Collections lecture 35 40
 
JAVA(UNIT 4)
JAVA(UNIT 4)JAVA(UNIT 4)
JAVA(UNIT 4)
 
Collection framework (completenotes) zeeshan
Collection framework (completenotes) zeeshanCollection framework (completenotes) zeeshan
Collection framework (completenotes) zeeshan
 
Java collections
Java collectionsJava collections
Java collections
 
Java collections
Java collectionsJava collections
Java collections
 
How to choose best containers in STL (C++)
How to choose best containers in STL (C++)How to choose best containers in STL (C++)
How to choose best containers in STL (C++)
 
Advanced core java
Advanced core javaAdvanced core java
Advanced core java
 
Collections - Lists & sets
Collections - Lists & setsCollections - Lists & sets
Collections - Lists & sets
 

More from Srikrishna k

Android
AndroidAndroid
Android
Srikrishna k
 
Hsqldb tutorial
Hsqldb tutorialHsqldb tutorial
Hsqldb tutorial
Srikrishna k
 
S3inmule
S3inmuleS3inmule
S3inmule
Srikrishna k
 
Mule sqs
Mule sqsMule sqs
Mule sqs
Srikrishna k
 
Apachepoitutorial
ApachepoitutorialApachepoitutorial
Apachepoitutorial
Srikrishna k
 
Introduction testingmule
Introduction testingmuleIntroduction testingmule
Introduction testingmule
Srikrishna k
 
Designpattern
DesignpatternDesignpattern
Designpattern
Srikrishna k
 
Kafka tutorial
Kafka tutorialKafka tutorial
Kafka tutorial
Srikrishna k
 
Test ng tutorial
Test ng tutorialTest ng tutorial
Test ng tutorial
Srikrishna k
 
Webservices intro
Webservices introWebservices intro
Webservices intro
Srikrishna k
 
Easy mock
Easy mockEasy mock
Easy mock
Srikrishna k
 
Apache kafka
Apache kafkaApache kafka
Apache kafka
Srikrishna k
 
Apachespark 160612140708
Apachespark 160612140708Apachespark 160612140708
Apachespark 160612140708
Srikrishna k
 
Vmtransport 160723040146
Vmtransport 160723040146Vmtransport 160723040146
Vmtransport 160723040146
Srikrishna k
 
Groovydemo 160721051742
Groovydemo 160721051742Groovydemo 160721051742
Groovydemo 160721051742
Srikrishna k
 
Apache kafka
Apache kafkaApache kafka
Apache kafka
Srikrishna k
 

More from Srikrishna k (16)

Android
AndroidAndroid
Android
 
Hsqldb tutorial
Hsqldb tutorialHsqldb tutorial
Hsqldb tutorial
 
S3inmule
S3inmuleS3inmule
S3inmule
 
Mule sqs
Mule sqsMule sqs
Mule sqs
 
Apachepoitutorial
ApachepoitutorialApachepoitutorial
Apachepoitutorial
 
Introduction testingmule
Introduction testingmuleIntroduction testingmule
Introduction testingmule
 
Designpattern
DesignpatternDesignpattern
Designpattern
 
Kafka tutorial
Kafka tutorialKafka tutorial
Kafka tutorial
 
Test ng tutorial
Test ng tutorialTest ng tutorial
Test ng tutorial
 
Webservices intro
Webservices introWebservices intro
Webservices intro
 
Easy mock
Easy mockEasy mock
Easy mock
 
Apache kafka
Apache kafkaApache kafka
Apache kafka
 
Apachespark 160612140708
Apachespark 160612140708Apachespark 160612140708
Apachespark 160612140708
 
Vmtransport 160723040146
Vmtransport 160723040146Vmtransport 160723040146
Vmtransport 160723040146
 
Groovydemo 160721051742
Groovydemo 160721051742Groovydemo 160721051742
Groovydemo 160721051742
 
Apache kafka
Apache kafkaApache kafka
Apache kafka
 

Recently uploaded

Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
Alan Dix
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Jeffrey Haguewood
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
Prayukth K V
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
Safe Software
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Ramesh Iyer
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
Product School
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Tobias Schneck
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
Guy Korland
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Thierry Lestable
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
Jemma Hussein Allen
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
RTTS
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
Thijs Feryn
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
Product School
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
Laura Byrne
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Product School
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
Frank van Harmelen
 

Recently uploaded (20)

Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
 

Java util

  • 1. Java.util Package Java.util package contains the collections framework, legacy collection classes, event model, date and time facilities, internationalization, and miscellaneous utility classes.
  • 2. ArrayDeque • 1. ArrayDeque implements Deque interface and ArrayDeque are available from jdk1.6. 2. Deque is that queue which allows insert and remove of elements from both sides. 3. ArrayDeque is not thread safe. ArrayDeque allows unlimited insertion of elements.
  • 3. Constructor & Description • ArrayDeque() • This constructor is used to create an empty array deque with an initial capacity sufficient to hold 16 elements. • ArrayDeque(Collection<? extends E> c) • This constructor is used to create a deque containing the elements of the specified collection. • ArrayDeque(int numElements) • This constructor is used to create an empty array deque with an initial capacity sufficient to hold the specified number of elements.
  • 4. • boolean add(E e) • This method inserts the specified element at the end of this deque. • void addFirst(E e) • This method inserts the specified element at the front of this deque. • void addLast(E e) • This method inserts the specified element at the end of this deque. • void clear() • This method removes all of the elements from this deque. • ArrayDeque<E> clone() • This method returns a copy of this deque. • boolean contains(Object o) • This method returns true if this deque contains the specified element.
  • 5. • The java.util.ArrayList class provides resizable-array and implements theList interface.Following are the important points about ArrayList: • ArrayList class can contain duplicate elements. • ArrayList class maintains insertion order. • ArrayList class is non synchronized. • ArrayList allows random access because array works at the index basis. • ArrayList class uses a dynamic array for storing the elements.It extends AbstractList class and implements List interface.
  • 6. • The java.util.Arrays class contains a static factory that allows arrays to be viewed as lists.Following are the important points about Arrays: • This class contains various methods for manipulating arrays (such as sorting and searching). • The methods in this class throw a NullPointerException if the specified array reference is null. • public class Arrays extends Object
  • 7. • The java.util.BitSet class implements a vector of bits that grows as needed.Following are the important points about BitSet: • A BitSet is not safe for multithreaded use without external synchronization. • All bits in the set initially have the value false. • Passing a null parameter to any of the methods in a BitSet will result in a NullPointerException. • BitSet() • This constructor creates a new bit set. • BitSet(int nbits) • This constructor creates a bit set whose initial size is large enough to explicitly represent bits with indices in the range 0 through nbits- 1.
  • 8. • The java.util.calendar class is an abstract class that provides methods for converting between a specific instant in time and a set of calendar fields such as YEAR, MONTH, DAY_OF_MONTH, HOUR, and so on, and for manipulating the calendar fields, such as getting the date of the next week. • public abstract class Calendar extends Object implements Serializable, Cloneable, Comparable<Calendar> • protected Calendar() • This constructor constructs a Calendar with the default time zone and locale. • protected Calendar(TimeZone zone, Locale aLocale) • This constructor constructs a calendar with the specified time zone and locale.
  • 9. • The java.util.Dictionary class is the abstract parent of any class, such as Hashtable, which maps keys to values.Following are the important points about Dictionary: • java.util.Dictionary class every key and every value is an object. • java.util.Dictionary object every key is associated with at most one value. • public abstract class Dictionary<K,V> extends Object • Dictionary() • This is the single constructor. • abstract Enumeration<V> elements() • This method returns an enumeration of the values in this dictionary. • abstract V get(Object key) • This method returns the value to which the key is mapped in this dictionary. • abstract boolean isEmpty() • This method tests if this dictionary maps no keys to value. • abstract Enumeration<K> keys() • This method returns an enumeration of the keys in this dictionary. • abstract int size() • This method returns the number of entries (distinct keys) in this dictionary. • etc…
  • 10. • The java.util.EnumMap class is a specialized Map implementation for use with enum keys.Following are the important points about EnumMap: • All of the keys in an enum map must come from a single enum type that is specified, explicitly or implicitly, when the map is created. • Enum maps are maintained in the natural order of their keys. • EnumMap is not synchronized.If multiple threads access an enum map concurrently, and at least one of the threads modifies the map, it should be synchronized externally. • public class EnumMap<K extends Enum<K>,V> extends AbstractMap<K,V> implements Serializable, Cloneable • EnumMap(Class<K> keyType) • This constructor creates an empty enum map with the
  • 11. HashMap in Java • HashMap in Java with Example. HashMap maintains key and value pairs and often denoted as HashMap<Key, Value> or HashMap<K, V>. • HashMap implements Map interface. • HashMap is similar to Hashtable with two exceptions – HashMap methods are unsynchornized and it allows null key and null values unlike Hashtable • A HashMap contains values based on the key. It implements the Map interface and extends AbstractMap class. • It contains only unique elements. • It may have one null key and multiple null values. • It maintains no order. • public class HashMap<K,V> extends AbstractMap<K,V>
  • 12. • uses hashtable to store the elements.It extends AbstractSet class and implements Set interface. • contains unique elements only. • Difference between List and Set: • List can contain duplicate elements whereas Set contains unique elements only. • public class HashSet<E> extends AbstractSet<E> implements Set<E>, Cloneable, Serializable • HashSet() • This constructs a new, empty set; the backing HashMap instance has default initial capacity (16) and load factor (0.75). • HashSet(Collection<? extends E> c) • This constructs a new set containing the elements in the specified collection. • boolean add(E e) • This method adds the specified element to this set if it is not already present.
  • 13. Java LinkedHashSet class • Java LinkedHashSet class • contains unique elements only like HashSet. It extends HashSet class and implements Set interface. • maintains insertion order. • The java.util.LinkedHashSet class is a Hash table and Linked list implementation of the Set interface, with predictable iteration order.Following are the important points about LinkedHashSet: • This class provides all of the optional Set operations, and permits null elements. • public class LinkedHashSet<E> extends HashSet<E> implements Set<E>, Cloneable, Serializable • LinkedHashSet() • This constructs a new, empty linked hash set with the default initial capacity (16) and load factor (0.75). • LinkedHashSet(Collection<? extends E> c) • This constructs a new linked hash set with the same elements as the specified collection.
  • 14. java.util.Properties • The java.util.Properties class is a class which represents a persistent set of properties.The Properties can be saved to a stream or loaded from a stream.Following are the important points about Properties: • Each key and its corresponding value in the property list is a string. • A property list can contain another property list as its 'defaults', this second property list is searched if the property key is not found in the original property list. • This class is thread-safe; multiple threads can share a single Properties object without the need for external synchronization. • public class Properties extends Hashtable<Object,Object> • Advantage of properties file • Easy Maintenance: If any information is changed from the properties file, you don't need to recompile the java class. It is mainly used to contain variable information i.e. to be changed. • String getProperty(String key) • This method searches for the property with the specified key in this