formartted string java
String str = String.format( "Hello \n World \n my name is %s and i'm %d years old" , "Paul", 27);
formartted string java
String str = String.format( "Hello \n World \n my name is %s and i'm %d years old" , "Paul", 27);
how to reverse a string in java
public class ReverseString {
public static void main(String[] args) {
String s1 = "neelendra";
for(int i=s1.length()-1;i>=0;i--)
{
System.out.print(s1.charAt(i));
}
}
}
string method example in java
public boolean equalsIgnoreCase(String s)
------------------------------------------
String x = "Exit";
System.out.println( x.equalsIgnoreCase("EXIT")); // is "true"
System.out.println( x.equalsIgnoreCase("tixe")); // is "false"
String in java
private String hello = "Hello world!";
//or
private String anotherHello = new String("Hello world");
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