About 1,880,000 results
Open links in new tab
  1. java - Get string character by index - Stack Overflow

    I know how to work out the index of a certain character or number in a string, but is there any predefined method I can use to give me the character at the nth position? So in the string "foo", if I

  2. Need to get current timestamp in Java - Stack Overflow

    Jun 1, 2000 · I need to get the current timestamp in Java, with the format of MM/DD/YYYY h:mm:ss AM/PM, For example: 06/01/2000 10:01:50 AM I need it to be Threadsafe as well. Can I utilize …

  3. How to check type of variable in Java? - Stack Overflow

    Oct 22, 2010 · 142 Java is a statically typed language, so the compiler does most of this checking for you. Once you declare a variable to be a certain type, the compiler will ensure that it is only ever …

  4. How to get the current date/time in Java - Stack Overflow

    Mar 3, 2011 · in Java 8, calling java.time.LocalDateTime.now() and java.time.ZonedDateTime.now() will give you representations 2 for the current date / time. Prior to Java 8, most people who know about …

  5. Setting JAVA_HOME environment variable in MS Windows

    JAVA_HOME if you installed the JDK (Java Development Kit) or JRE_HOME if you installed the JRE (Java Runtime Environment). In the Variable Value field, enter your JDK or JRE installation path . …

  6. How do I generate random integers within a specific range in Java ...

    Java 7+ In Java 1.7 or later, the standard way to do this (generate a basic non-cryptographically secure random integer in the range ) is as follows:

  7. java - How do I find where JDK is installed on my windows machine ...

    Jan 13, 2011 · 426 I need to know where JDK is located on my machine. On running Java -version in cmd, it shows the version as '1.6.xx'. To find the location of this SDK on my machine I tried using …

  8. How to get the user input in Java? - Stack Overflow

    Mar 13, 2011 · I attempted to create a calculator, but I can not get it to work because I don't know how to get user input. How can I get the user input in Java?

  9. java - How to use ArrayList's get () method - Stack Overflow

    Apr 21, 2012 · I'm new to java (& to OOP too) and I'm trying to understand about the class ArrayList but I don't understand how to use the get(). I tried searching in net, but couldn't find anything helpful.

  10. java - Way to get number of digits in an int? - Stack Overflow

    Aug 20, 2009 · Is there a neater way for getting the number of digits in an int than this method? int numDigits = String.valueOf(1000).length();