2:57 am - Friday April 19, 2019

String Example Program for format(Locale l, String format, Object… args)

CANDID INDUSTRIAL TRAINING -- CHENNAI
Corporate Training for Experienced Candidate
Struts | Hibernate | Spring | Java / J2EE
SOAP | RestFull | Design Pattern | more...
Ph: +91 72000 69003
137b, 2nd st, shanthi nagar, Chrompet, Chennai -600044
/**
@author: candidjava
@description: to get the string and check the given string is in the language mean return the string otherwise return null values
*/
import java.util.*;
public class DeeFormat
{
public static void main(String []args) throws Exception
{
try{
System.out.format(Locale.ENGLISH,"candid",999);//the string is in the language mean return true //otherwise false
System.out.format(?\t? Locale. FRENCH,"#F1 race",111); //the string is in the language mean return true //otherwise false
}
catch(Exception e)
{
System.out.println(e.getMessage());
}
}
}

output:
Candid #F1 race


BACK

Filed in: Z-A All Java Codes

Comments are closed.