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 :: difference between offer and add in linkedlist in java 
Java :: how to use ? in java without using if 
Java :: get id of html tag by class 
Java :: java verify string is hexadecimal 
Java :: java klasse 
Java :: org.springframework.orm.jpa.EntityManagerHolder cannot be cast to org.springframework.orm.hibernate5.SessionHolder 
Java :: how to add a keylistener to a jframe 
Java :: java execute funtions at same time 
Java :: java coding standards for methods 
Java :: java stop execution 
Java :: java only close socket outputstream 
Java :: jsp import 
Java :: android onlcik java 
Java :: How to generate all subsets of a given set in Java? 
Java :: how to play an audio file in java 
Java :: JAVA_HOME is not defined correctly. 
Java :: how to programitically remove action bar from an activity in android studio 
Java :: java shorthand if 
Java :: print map in java 
Java :: javafx detect collision 
Java :: list of BigInteger to list of long 
Java :: how to convert outputstream to bytearrayoutputstream in java 
Java :: array to array list 
Java :: mongoose collection name 
Java :: spring jpa count all rows 
Java :: java random char 
Java :: free news api for android 
Java :: list to array java 
Java :: android vibrate 
Java :: turn ascii into text javascriot 
ADD CONTENT
Topic
Content
Source link
Name
5+3 =