Your question looks like you want to cut a string to 3 characters.
Example:
String s = "string";
System.out.println(s.substring(0, 3));
Tell me if I misunderstood the question. Also, please reread the question, you are misleading people.
More Related Contents:
- What do the characters ((?:(?:(?: mean in pattern-matching? [duplicate]
- How to do aggregate functions, may columns and extract back
- How do servlets work? Instantiation, sessions, shared variables and multithreading
- Why does Gson fromJson throw a JsonSyntaxException: Expected BEGIN_OBJECT but was BEGIN_ARRAY?
- How can I generate an MD5 hash in Java?
- Difference between regex [A-z] and [a-zA-Z]
- How to randomly pick an element from an array
- How to run test methods in specific order in JUnit4?
- How to efficiently remove duplicates from an array without using Set
- Loading resources using getClass().getResource()
- Date and time conversion to some other Timezone in java
- How to store more than one string in a Map?
- Painting the slider icon of JSlider
- Integer wrapper class and == operator – where is behavior specified? [duplicate]
- Android, Java: HTTP POST Request
- Meaning of the import statement in a Java file
- What exactly is Apache Camel?
- What is difference between CrudRepository and JpaRepository interfaces in Spring Data JPA?
- Java Singleton and Synchronization
- How to resize JLabel ImageIcon?
- Internal padding for JTextArea with background Image
- To use a string value as a variable name [duplicate]
- Trouble with filewriter overwriting files instead of appending to the end
- Java: A two dimensional array is stored in column-major or row-major order?
- What is the character encoding of String in Java?
- Setting outer variable from anonymous inner class
- How to set IntelliJ IDEA Project SDK
- break and label, “The label MyLabel is missing”
- Read an Image/file from External storage Android
- Create session factory in Hibernate 4