How to get first two characters of a string in java
We can get first two character of a string in java by using subString() method in java To get first N numbers of a string s.substring(0,n); Lets see an example java program on how to get first two characters or first N characters. Program #1: Java Program
Popular Articles by this blogger
- Java Jsp Interview Questions

- Method overloading interview questions

- Bitwise Operators in java

- Top 20 Java Exception handling interview questions and answers for freshers and experienced

- Basic Java example program to replace an element at specified index arraylist

- Java Servlet Interview Questions

- Top 16 Java Inheritance Interview questions for freshers and experienced

- Private constructor in java example

