About 1,970,000 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 - 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} …

  3. Creating subset of a Set in Java - Stack Overflow

    I have a LinkedHashSet, i.e an ordered set. I'm trying to find a function to just return a subset of the set, i.e the first 20 elements of the set. I know I can do it by creating a new set and then

  4. Setting JAVA_HOME environment variable in MS Windows

    12 Set the JAVA_HOME Variable Windows 7 – Right click My Computer and select Properties > Advanced Windows 8 – Go to Control Panel > System > Advanced System Settings Windows …

  5. Force Java timezone as GMT/UTC - Stack Overflow

    The java.util.Date and java.sql.Date classes store the actual time (milliseconds) in UTC. To format these on output to another timezone, use SimpleDateFormat. You can also associate a …

  6. How to set the environment variables for Java in Windows

    Step 5: Enter the Variable name as JAVA_HOME and the value to your jdk bin path ie c:\Programfiles\Java\jdk-1.6\bin and NOTE Make sure u start with .; in the Value so that it …

  7. java - How to set a JVM TimeZone Properly - Stack Overflow

    Mar 22, 2010 · I am trying to run a Java program, but it is taking a default GMT timezone instead of an OS defined timezone. My JDK version is 1.5 and the OS is Windows Server Enterprise …

  8. java - Getting an element from a Set - Stack Overflow

    Aug 19, 2016 · From the Set Javadoc: "Note: Great care must be exercised if mutable objects are used as set elements. The behavior of a set is not specified if the value of an object is …

  9. sorting - Java Set retain order? - Stack Overflow

    May 25, 2012 · Does a Java Set retain order? A method is returning a Set to me and supposedly the data is ordered but iterating over the Set, the data is unordered. Is there a better way to …

  10. 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 …