Skip to main content

The different between Set and List


Set and List explanation

  • Set – Stored elements in unordered or shuffles way, and does not allow duplicate values.
  • List – Stored elements in ordered way, and allow duplicate values.

Comments

Popular posts from this blog

Exercise 1: 99 Bottles of Beer

Let’s put all your new Java skills to good use with something practical. We need a class with a main(), an int and a String variable, a while loop, and an if test. A little more polish, and you’ll be building that business backend in no time. But before you look at the code on this page, think for a moment about how you would code that classic children’s favorite, “99 bottles of beer.” There’s still one little flaw in our code. It compiles and runs, but the output isn’t 100% perfect. See if you can spot the flaw , and fix it. public class BeerSong { public static void main (String[] args) { int beerNum = 99; String word = “bottles”; while (beerNum > 0) { if (beerNum == 1) { word = “bottle”; // singular, as in ONE bottle. } System.out.println(beerNum + “ ” + word + “ of beer on the wall”); System.out.println(beerNum + “ ” + word + “ of beer.”); System.out.println(“Take one down.”); System.out.println(“Pass it around.”); beerNum = beerNum - 1; if (...

Java Web Frameworks Comparison: Spring MVC, Grails, Vaadin, GWT, Wicket, Play, Struts and JSF

Web Frameworks are all very different and have been typically created for different reasons and to achieve different goals. Which Java Web Framework will you use in your next project and why would you chose one over the other? Watch the video of this comparison: Thank to  http://zeroturnaround.com/

JavaScript on JVM, Code Right Away on Your Java App

In Java 8, Nashorn has been embedded into the new JVM. Nashorn 's goal is to implement a lightweight high-performance JavaScript runtime in Java with a native JVM. This Project intends to enable Java developers embedding of JavaScript in Java applications via JSR-223 and to develop free standing JavaScript applications using the jrunscript command-line tool. Find-out around it! Wiki Blog about Nashorn  : Where Oracle introduce how-nashorn-work