imsavva.com

Folder icon

Tags / Java

1Z0-808
2018
ATG
Apache Fop
Bash
CNC
Elasticsearch
GWT
Groovy
JPA
Java
JavaScript
Jenkins
Jetty
Kibana
Linux
Malta
MySQL
OCA
PDF
Sed
Ubuntu
Windows services
collections
concurrency
dates
dig deeper
essay
exceptions
food
games
interview questions
logging
movies
patterns
photos
shopping
task
technical
thoughts
trash
trip
windows
1
2
3
4
5

Whas is a collection?

showPostImage(-1803150519)

Uncaught exception: the image is currently being shown in a museum

Collection is an object that groups multiple elements into a single unit. Collections are used to store, retrieve and manipulate data. Live example: several Employee objects can be grouped into a collection: Java has a Java Collection Framework (JCF), which consists of: Interfaces - these are abstract data types that…
Posted on
2016-03-19

What benefits does JCF provide?

showPostImage(-1054418192)

Uncaught exception: the image is currently being shown in a museum

Java Collections Framework provides the following benefits: Reduces programming effort: you don’t need to invent the wheel anymore, JCF provides useful data structures and algorithms. Increases program speed and quality: JCF provides high-performance, high-quality implementations of useful data structures and…
Posted on
2016-03-19

What is a diamond operator?

This is an improvement appeared in Java 7. Consider you have a class with a long name and you need to create a HashMap of Strings and Lists of your class instances. You code will look like this: In Java 7 you can write less code using the diamond operator(< > ):
Posted on
2016-03-19

What data can be stored in a collection?

showPostImage(436047025)

Uncaught exception: the image is currently being shown in a museum

You can store anything but primitives. To store primitives consider using wrappers (Integer for int, Double for double, etc…). For example, you can store your own classes: To store primitives: Notice, that you can add primitives, since it will be wrapped automatically:
Posted on
2016-03-19

What methods does Java Collection interface contain?

showPostImage(890699667)

Uncaught exception: the image is currently being shown in a museum

int size(); boolean isEmpty(); boolean contains(Object o); Iterator iterator(); Object [ ] toArray(); T [ ] toArray(T [ ] a); boolean add(E e); boolean remove(Object o); boolean containsAll(Collection<?> c); boolean addAll(Collection<? extends E> c); boolean removeAll(Collection<?> c); boolean retainAll(Collection…
Posted on
2016-03-19

Some daily news

There are some interesting things in my life today. I started learning English again, and I finished one of my interesting tasks. Today, 14 June 2015, I started learning English at the office, where I'm studying Java. I have lessons every Tuesday and Thursday. Also I'm going to continue taking personal lessons in my…
Posted on
2015-07-14

Object initialization order

showPostImage(-1685463569)

Uncaught exception: the image was stolen by a UFO

If you don't know how objects initialize in Java, it may be a surprise when you write some code. Click more to see Java object initialization order and an example. The initialization order is: Parent static initialize block Parent static field Child static field Child static initialize block Parent instance initialize…
Posted on
2015-06-29
1
2
3
4
5
Do I really need the footer?