Search
 
SCRIPT & CODE EXAMPLE
 

JAVA

check last character of string java

String str = "India";
System.out.println("last char = " + str.charAt(str.length() - 1));
Comment

java get last char of string

public class Test {
    public static void main(String args[]) {
        String string = args[0];
        System.out.println("last character: " +
                           string.substring(string.length() - 1)); 
    }
}
Comment

get last character from string

str.slice(-1);
Comment

last char in 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)); 
    }
}
Comment

PREVIOUS NEXT
Code Example
Java :: how to create a stack data structure in java? 
Java :: convert string to character array 
Java :: check if string contains only letters java 
Java :: javafx stackpane set position 
Java :: start fragment from activity 
Java :: how to add animation between activity in android 
Java :: java const 
Java :: how to check the lines in a file java scanner 
Java :: get distance from latitude and longitude code android 
Java :: java setbounds 
Java :: java observer pattern 
Java :: set remove element java 
Java :: sqlexception 
Java :: how to get the average from a list in java 
Java :: how to send a byte array in socket java 
Java :: java stream limit items 
Java :: java split string by length 
Java :: Java how to make a number without a digit 
Java :: java distinct by key 
Java :: java 8 datediff in days 
Java :: junit vintage engine maven 
Java :: android studio create a Uri 
Java :: java find all of letter in string 
Java :: timestamp java jpa 
Java :: date format in java 
Java :: android remove focus from an element 
Java :: spring scheduled 
Java :: java switch case 
Java :: react The href attribute is required for an anchor to be keyboard 
Java :: javac celar 
ADD CONTENT
Topic
Content
Source link
Name
5+1 =