About 50 results
Open links in new tab
  1. collections - How to use java.Set - Stack Overflow

    Mar 22, 2010 · 56 The first thing you need to study is the java.util.Set API. Here's a small example of how to use its methods:

  2. java - SSL and cert keystore - Stack Overflow

    Aug 16, 2021 · SSL properties are set at the JVM level via system properties. Meaning you can either set them when you run the program (java -D....) Or you can set them in code by doing …

  3. java - Set.of (E... elements) - which Set implementation is it using ...

    Mar 2, 2022 · MySillyTest$1 is an anonymous subclass of HashSet; Set.of() is returning an unmodifiable set {usually a non-public class, can change depending on version of Java} {source code of …

  4. java - What is a classpath and how do I set it? - Stack Overflow

    Mar 7, 2010 · 79 The classpath is one of the fundamental concepts in the Java world and it's often misunderstood or not understood at all by Java programmes, especially beginners. Simply put, the …

  5. java - when to use Set vs. Collection? - Stack Overflow

    May 4, 2009 · 51 Is there any practical difference between a Set and Collection in Java, besides the fact that a Collection can include the same element twice? They have the same methods. (For example, …

  6. How to get first item from a java.util.Set? - Stack Overflow

    Dec 11, 2013 · Pretty much all of the answers are wrong in the special case where you have a set with exactly one item. In that case there is certainly a "first" (and also a "last") item in the set. It's a shame …

  7. java - What is the difference between Set and List? - Stack Overflow

    A Java set can be ordered, depending on the implementation; for example, a Java TreeSet is ordered. In the context of Java, the only difference between a List and a Set is that the Set contains unique items.

  8. java - How do I set the proxy to be used by the JVM - Stack Overflow

    Sep 23, 2008 · Many times, a Java app needs to connect to the Internet. The most common example happens when it is reading an XML file and needs to download its schema. I am behind a proxy …

  9. How to set a Timer in Java? - Stack Overflow

    Oct 28, 2010 · How to set a Timer, say for 2 minutes, to try to connect to a Database then throw exception if there is any issue in connection?

  10. Why doesn't java.util.Set have get (int index)? - Stack Overflow

    Mar 21, 2017 · Why does the java.util.Set interface lack get(int Index), or any similar get() method? It seems that sets are great for putting things into, but I can't find an elegant way of retrieving a single i...