java get last char of string
Java
public class Test {
public static void main(String args[]) {
String string = args[0];
System.out.println("last character: " +
string.substring(string.length() - 1));
}
}String str = "India";
System.out.println("last char = " + str.charAt(str.length() - 1));
Also in Java:
- Title
- java string to lower case
- Category
- Java
- Title
- covariant type in java
- Category
- Java
- Title
- java do while
- Category
- Java
- Title
- google translate
- Category
- Java
- Title
- Method used for getting metadata of a database in jdbc
- Category
- Java
- Title
- terminate a thread java
- Category
- Java
- Title
- how to make javafx full screen default
- Category
- Java
- Title
- how to set a windows background image tkinter
- Category
- Java
- Title
- log10 in java
- Category
- Java
- Title
- map.keyset in java
- Category
- Java
- Title
- check leap year in java
- Category
- Java
- Title
- string replace java
- Category
- Java
- Title
- how to read a csv file java
- Category
- Java
- Title
- Java's BigInteger class
- Category
- Java
- Title
- java create file with content
- Category
- Java
- Title
- java class array of objects
- Category
- Java
- Title
- logger in java
- Category
- Java
- Title
- how to initialize array in java
- Category
- Java
- Title
- java initialize string array
- Category
- Java
- Title
- creating the functional interface in java
- Category
- Java
- Title
- java bubble sort short circuit
- Category
- Java
- Title
- how to delete an element from an array in java
- Category
- Java
- Title
- spring data jpa inheritance repository
- Category
- Java
- Title
- run java classpath command line
- Category
- Java
- Title
- how to make a pre set list java
- Category
- Java
- Title
- read integer input java
- Category
- Java
- Title
- uppercase java
- Category
- Java
- Title
- java replace all xml decoding
- Category
- Java
- Title
- How to loop through objects in java using streams
- Category
- Java
- Title
- what is a float java
- Category
- Java
- Title
- how to get individual words from a string in java
- Category
- Java
- Title
- java replace all html tags
- Category
- Java
- Title
- Java If statemtn
- Category
- Java
- Title
- switch java 11
- Category
- Java
- Title
- java logical operator
- Category
- Java
- Title
- async in fragment
- Category
- Java
- Title
- java 8 findany on null list
- Category
- Java
- Title
- delete object java
- Category
- Java
- Title
- math maximum java
- Category
- Java
- Title
- scanner check if int
- Category
- Java
- Title
- java create txt file
- Category
- Java
- Title
- string replace last character java
- Category
- Java
- Title
- java cmd install raspbian
- Category
- Java
- Title
- connect 2 package in android
- Category
- Java
- Title
- java shuffle list
- Category
- Java
- Title
- java square a number
- Category
- Java
- Title
- java arraylist to array
- Category
- Java
- Title
- java save string in text file
- Category
- Java
- Title
- Linked List implementation
- Category
- Java
- Title
- index 1 out of bound for length 1 java
- Category
- Java
- Title
- how to make array of objects in java and use it
- Category
- Java
- Title
- spigot custom join message
- Category
- Java
- Title
- how to add two map values in java
- Category
- Java
- Title
- java return new instance of generic type
- Category
- Java
- Title
- java swing button on click
- Category
- Java
- Title
- json request body not getting parsed by spring boot controller
- Category
- Java
- Title
- try block in java
- Category
- Java
- Title
- bigdecimal divide java
- Category
- Java
- Title
- java convert string with commas to long
- Category
- Java
- Title
- get first character of string java
- Category
- Java
- Title
- store string elements in character array in java
- Category
- Java
- Title
- how to read to into a file in java
- Category
- Java
- Title
- java while loop example
- Category
- Java
- Title
- recursion in java
- Category
- Java
- Title
- java convert a set to array
- Category
- Java
- Title
- write file java
- Category
- Java
- Title
- méthode retourne nom classe java
- Category
- Java
- Title
- how to add a list in a list java
- Category
- Java
- Title
- how to read in a file in java
- Category
- Java
- Title
- java valeur absolue
- Category
- Java
- Title
- how to find the total of the products added to the shopping cart in java program
- Category
- Java
- Title
- absolute value in java
- Category
- Java
- Title
- how to use the this keyword in java
- Category
- Java
- Title
- java random number in range
- Category
- Java
- Title
- armstrong number in java
- Category
- Java
- Title
- convert string to mayus java
- Category
- Java
- Title
- splitting using regex java
- Category
- Java
- Title
- java int array
- Category
- Java
- Title
- java random seed
- Category
- Java
- Title
- how to declare an array in java
- Category
- Java
- Title
- find the triplet sum in java linked list
- Category
- Java
- Title
- creating random color in java
- Category
- Java
- Title
- primitive data types in java
- Category
- Java
- Title
- how to create a Scanner Object in java
- Category
- Java
- Title
- android switch on change
- Category
- Java
- Title
- pascals triangle java
- Category
- Java
- Title
- Compare integers java sort
- Category
- Java
- Title
- com.android.builder.dexing.DexArchiveMergerException:
- Category
- Java
- Title
- create instance object java
- Category
- Java
- Title
- How to make a class in Java?
- Category
- Java
- Title
- html redirect
- Category
- Java
- Title
- html top padding
- Category
- Java
- Title
- java while loop break
- Category
- Java
- Title
- java question mark operator
- Category
- Java
- Title
- how to create an array of arraylist in java
- Category
- Java
- Title
- how to end a program in an if statement java
- Category
- Java
- Title
- array in line java
- Category
- Java
- Title
- string to char in java
- Category
- Java
- Title
- java spring boot json deserialize date inaccurate
- Category
- Java
- Title
- login and logout react native and firebase
- Category
- Java