The Collections of Objects

Jerry   August 13, 2015   Comments Off on The Collections of Objects


Here is a section that will particularly please you. We will see that we are not obliged to store our data in tables! These famous collections of objects are also dynamic: basically, they do not have a set size. It is therefore impossible to exceed their capacity!

I do not pass through all types and all objects Collection because they are many, but we will see the main ones. The objects we’ll cover here are all in the package java.util . Easy to remember, right?

This chapter will be of great use because the collections are essential in Java programs and they define an important part of answering the question of what is java.

The different types of collections

Before presenting some objects, I propose to introduce the component hierarchy of interfaces called collections. Yes, you read that right, it is indeed interfaces: they encapsulate most of the methods used with all concrete implementations. Here’s a small class diagram in the following figure schematizing this hierarchy.


You can see there are many types of collections, the interfaces List and Set directly implement the interface Collection and the interface Map revolves around this hierarchy, while being part of the Java collections.

Reading the rest of this chapter, you will find that these interfaces have features corresponding to specific needs. Objects of type List is used to store objects without special conditions on how to store them. They accept all values, even values ​​null . Types Set are a bit more restrictive since they do not allow twice the same value (same object), which is convenient for a list of unique items, for example. The Map are unique because they work with a key system – value to store and find the objects they contain.

Now that I have briefly explained the differences between these types, see how to use these objects.

The List Objects

The objects belonging to the category list are, in short, expandable tables at will. It includes objectsVector , LinkedList and ArrayList . You can insert as many items as you want without fear of exceeding the size of your table. They all work the same way: you can recover the items in the list via their indices. In addition, the list contains objects. I suggest you see two objects of this type that I think will be very useful.

The object LinkedList

A linked list (LinkedList in English) is a list in which each element is linked to the adjacent elements by a reference to the latter. Each element contains a reference to the previous item and the next item, except the first, which the previous item is null , and the last, the next element which is also null .

The following figure shows a diagram one that allows you to represent you better operation of this item:

java programming


Here’s some code to support my statements:

import java .useful .LinkedList ;import java.util.List;import java .useful .ListIterator ; public class Test  {   public static void main(String[] args) {    List l = new LinkedList();    l.add(12);    l.add("toto ! !");    l.add(12.20f);     for(int i = 0; i < l.size(); i++)      System.out.println("Élément à l'index " + i + " = " + l.get(i));  }}

If you try this code, you will find that all the elements are displayed!

There is something else you need to know about this type of object: they implement the interfaceIterator . So we can use this interface to list our LinkedList .

An iterator is an object that has the role to browse a collection. This is also his only reason for being. To be precise, the use of iterators in Java works the same way as the pattern of the same name. Just as we saw with the strategy pattern , the design patterns are actually objects of design models for better stability and increased reusability. Iterators are included.

In the following code, I added the course with an iterator:

import java .useful .LinkedList ;import java.util.List;import java .useful .ListIterator ; public class Test  {   public static void main(String[] args) {    List l = new LinkedList();    l.add(12);    l.add("toto ! !");    l.add(12.20f);     for(int i = 0; i < l.size(); i++)      System.out.println("Élément à l'index " + i + " = " + l.get(i));       System.out.println("\n \tParcours avec un itérateur ");      System.out.println("-----------------------------------");      ListIterator li = l.listIterator();       while(li.hasNext())        System.out.println(;  }}

The two approaches are similar!

Note that I have to tell you something about the linked list: since all elements contain a reference to the next element, such lists may become particularly severe growing! However, they are suitable when you have a lot to handle a collection by deleting or adding objects to the list environment. They are so use with caution.

The object ArrayList

Here’s a handy object. ArrayList is one of those objects that have no size limit and, in addition, accept any type of data, including null ! We can put anything we want in an ArrayList , here is a piece of code that shows:

import java .useful .ArrayList ; public class Test  {   public static void main(String[] args) {             ArrayList al = new ArrayList();    al.add(12);    al .add ("A string!" );    al.add(12.20f);    al.add('d');                    for(int i = 0; i < al.size(); i++)    {      System.out.println("donnée à l'indice " + i + " = " + al.get(i));    }                 }}

If you run this code, you will get the following figure.

java features

I think you can already see the benefits of ArrayList .
Also note that there is a whole range of methods provided with this item:

  • add () adds an element;
  • get (int index) returns the item to the requested index;
  • remove (int index) clears the entrance to the requested index;
  • isEmpty () returns “true” if the object is empty;
  • removeAll () erases all contents of the article;
  • contains (Object element) returns “true” if the element passed in parameter is in theArrayList .

Unlike LinkedList , the ArrayList is fast read, even with a large volume of objects. However, they are slower if you need to add or remove data in the middle list. In summary in the extreme, if you do a lot of reading without worrying about the order of items, use a ArrayList ; However, if you insert a lot of data in the middle of the list, go for a LinkedList .


Sublime Text 3: Setup, Package Control, and Settings

Jerry   November 26, 2015   Comments Off on Sublime Text 3: Setup, Package Control, and Settings

A quick walkthrough on setting up a development environment using Sublime Text 3.

The packages installed in this video are:
Dayle Rees Colorschemes
Sidebar Enhancements (No longer on Sublime Text 2)
SublimeLinter with JSHint and CSSLint

If you enjoy these videos and would like to support my channel, I would greatly appreciate any assistance through my Patreon account:

If you would like to see additional ways in which you can support the channel, you can check out my support page:

You can find me on:
My website –
Facebook –
Twitter –
Google Plus –
Tumblr –

Android Studio Tutorial

Jerry   November 25, 2015   Comments Off on Android Studio Tutorial

Get the Android Virtual Device Here :

Download Java 1.7 :
Android Studio Download :
Android OEM USB Drivers :
Git Tutorial :
Best Android Book :

I have been getting Android Studio requests for a while now so I decided to make one. In my opinion Android Studio is finally better then Eclipse for developing Android apps. It is also very easy to install.

We’ll look at how to install it on Windows and Mac OSX. Then well configure everything properly to make sure we handle the potential errors. We set up gitHub and go over how to push to remote repositories. We then look at Gradle, the interface and much more.

How to debug Java programs using -Xlint:unchecked in Netbeans

Jerry   November 24, 2015   Comments Off on How to debug Java programs using -Xlint:unchecked in Netbeans

How to debug Java programs using –Xlint:unchecked in Netbeans. Sometimes when you build your Java programs you may see messages warning you about “unchecked or unsafe” operations but it may not tell you what those operations are. You can get more information by rebuilding your program using the –Xlint:unchecked compiler option. This video shows you how to set that option and shows the extra information which you see as a result.

If you want even more detailed warnings on compiling, you can use the –Xlint compiler option instead of -Xlint:unchecked. And you can use various other compiler options to configure the output when you build. For more on –Xlint:unchecked and other compiler options, be sure to read Oracle’s documentation for the Java compiler here:

There is also some useful information in the Java tutorial here:

This is one of a series of 60 second programming tutorials from Bitwise Courses.

For more hints and tips subscribe to the Bitwise Courses YouTube channel:

For in-depth programming tutorials, see the Bitwise Courses web site:

Solución java no se reconoce como comando, programa o archivo [Español]

Jerry   November 22, 2015   Comments Off on Solución java no se reconoce como comando, programa o archivo [Español]

Hola a todo el mundo y bienvenidos a ImperiumCrafters.
Hoy os vamos a enseñar una solución a un problema de java

Subscribete aquí:

Siguenos en Twitter:

Queremos agradecer a MontageFreak2 por su colaboración en la creación de un montaje para nuestro servidor.
Su canal:

La información del servidor va a estar disponible más adelante.

Descripción del video:
Tutorial para aprender a solucionar un error de los servidores bukkit. Ese error se trata de una falta de reconocimiento de java por parte de nuestro ordenador.
El tutorial es original y propio, y es el resultado de una búsqueda larga (entre dos y tres semanas) de los motivos y posibles soluciones por internet

Links del tutorial:
Foto java no se reconoce:
Foto java se reconoce:

Si despues de terminar de hacer todo lo que dice el tutorial no funciona, reinicia el ordenador

Quieres ayudarnos?
Rellena este formulario para ayudarnos en la creación de nuestro server:

Otros videos que te pueden interesar:
Intro española:

Canales que te pueden interesar:
MontageFreak2: [Crea montages de juegos]

Elmanucod90: [Crea skins de Minecraft, ha creado la de Oriol]

Java 8 and Embedded JavaFX

Jerry   November 21, 2015   Comments Off on Java 8 and Embedded JavaFX

Presentation on using the new embedded features in Java 8, including JavaFX on devices like the Raspberry Pi and Lego Mindstorms EV3. Also covers JavaFX on tablets and smartphones. – Captured Live on Ustream at

Pass easily 1Z0-808 Java SE 8 Programmer I Exam

Jerry   November 20, 2015   Comments Off on Pass easily 1Z0-808 Java SE 8 Programmer I Exam

In this 1Z0-808 exam related video we will share some resources That can insure passing in Oracle 1Z0-808 exam. Read the Description or watch 1Z0-808 test video.
For More Information and Tips Check:


30-40% Candidates fail in Oracle exams even after getting through different tutorials, books and videos. The reason is: They do not validate there knowledge or practice the 1Z0-808 exam before attempting to actual 1Z0-808 exam. It’s a saying “Practice makes perfect”, Following this advice can help to be Oracle certified professional.

For practising and validating your knowledge you can use 1Z0-808 practice test that provides functionality of attempting exam with questions and multiple choices with every question.

The right way of 1Z0-808 test preparation can increase the confidence on your knowledge and what you’ve prepared for. Many Candidates fail in Oracle tests because of exam type or they lose confidence during the exam.

Hacking Tip: Password Cracking with Cain & Abel

Jerry   November 19, 2015   Comments Off on Hacking Tip: Password Cracking with Cain & Abel

Learn the basics of cracking password hashes using Cain & Abel:

Cain & Abel –

MD5 and SHA-1 Hash generator –

Top 10,000 most commonly used passwords –

Anubias and Java Fern with Rhizome Roots: Looking at Rhizomes

Jerry   November 18, 2015   Comments Off on Anubias and Java Fern with Rhizome Roots: Looking at Rhizomes


How to Tie Anubias and Java Fern to rocks. Staurogyne Repens, Large focal Plants (3 of 4)

Anubias Flowering: Species Sunday

Aquarium Plant Species. SPECIES SUNDAY! All Aquarium Plants

Hardy Species of Aquarium Plants. 8 Great Hardy Aquarium plants. Species Sunday

Buy Anubias
Free Tips
Anubias and Java Fern have rhizome roots. This means they don’t need to be under the gravel. Anubias and Java Fern love having themselves tied to a rock or piece of wood. Rhizome roots are important to the growth of a health plant. I like to put them on top of driftwood. Enjoy!

Welcome to Dustin’s Fish Tanks YouTube Channel. My channel is made for FISH TANK PEOPLE! I try to focus on planted aquariums, how to grow aquarium plants, dirt as the planted tank substrate and low light aquarium plants. Planted tanks shouldn’t be difficult. My goal is to make the planted aquarium hobby easy…Planted Tanks Made Easy! Dustin’s Fish Tanks. TANK ON!

Click here to subscribe for more great videos every week !

Free Top 10 Planted Tank Secrets on website:


Aquarium Plants For Sale:

Fish Tank People Social Community