check last character of string java
String str = "India";
System.out.println("last char = " + str.charAt(str.length() - 1));
check last character of string java
String str = "India";
System.out.println("last char = " + str.charAt(str.length() - 1));
Get the First and Last Word from a String or Sentence
DECLARE @Sentence VARCHAR(MAX) = 'The quick brown fox jumps over the lazy dog'
SELECT SUBSTRING(@Sentence, 1, CHARINDEX(' ', @Sentence) - 1) AS [First Word],
REVERSE(SUBSTRING(REVERSE(@Sentence), 1, CHARINDEX(' ', REVERSE(@Sentence)) - 1)) AS [Last Word]
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us