About 156,000 results
Open links in new tab
  1. Java String import - Stack Overflow

    Oct 31, 2011 · Java String import. Ask Question Asked 13 years, 5 months ago. Modified 3 years, 1 month ago. Viewed 191k ...

  2. Java String import java.lang.String - Stack Overflow

    Nov 9, 2017 · When I use String in Java do I need to import java.lang.String? Or I can simply use it? Is String imported by default? I am using Eclipse and as I know they use another compiler that Java does. What is the standard way?

  3. java - Getting Keyboard Input - Stack Overflow

    Jul 9, 2013 · @KillBill thanks for your comment, I had forgotten about this question, in a few days I'll try to edit it with a better explanation, when I wrote this answer I was starting my high school studies, today I work in an IT company and I'll write this in the best way I can; back then I was a complete newbie, I can't edit it right now because I have some work to do, but I promise I'll edit …

  4. How to format strings in Java - Stack Overflow

    Format-first since Java 15, alternative to String#format. There is a new instance method called String#formatted(Object... args) as of Java 15. The internal implementation is the same as String#format(String format, Object... args). Formats using this string as the format string, and the supplied arguments.

  5. java - What to import to use IOUtils.toString ... - Stack Overflow

    May 14, 2013 · If you're on java 9 or later and you have an input stream to read you can use InputStream#readAllBytes(). Just create a string from there and don't forget to specify charset. String s = new String(inputStream.readAllBytes(), StandardCharsets.UTF_8);

  6. java.util.scanner - How can I read input from the console using the ...

    This Scanner class comes under java.util, hence the first line of the program is import java.util.Scanner; which allows the user to read values of various types in Java. The import statement line should have to be in the first line the java …

  7. Encoding as Base64 in Java - Stack Overflow

    Update (2016-12-16) You can now use java.util.Base64 with Java 8. First, import it as you normally do: import java.util.Base64;

  8. Where to get "UTF-8" string literal in Java? - Stack Overflow

    Apr 17, 2017 · @deprecated Java 7 introduced {@link java.nio.charset.StandardCharsets}, which defines these constants as {@link Charset} objects. Use {@link Charset#name()} to get the string values provided in this class. This class will be removed in a future release.

  9. java - How do I use a PriorityQueue? - Stack Overflow

    Java 8 solution. We can use lambda expression or method reference introduced in Java 8. In case we have some String values stored in the Priority Queue (having capacity 5) we can provide inline comparator (based on length of String) :

  10. How to read json file into java with simple JSON library

    Jun 7, 2012 · The whole file is an array and there are objects and other arrays (e.g. cars) in the whole array of the file. ...

Refresh