Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

diffrence b\w println() and printf()

Answer Posted / mohneesh

printf in Java works exactly as in C.

it automatically formats your string, which is not possible
in println directly.

System.out.printf("%s\n\t%s","Mohneesh","Wadhwani");

Output:
Mohneesh
Wadhwani

where as you can use String Formatter to format String then
pass it to println to print.

Is This Answer Correct ?    16 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What does the “static” keyword mean?

1056


Can we extend a class with private constructor?

948


Why java is said to be pass-by-value ?

991


What is the common usage of serialization?

1078


What are the advantages of autoboxing?

985


Why singleton pattern is better than creating singleton class with static instance?

967


Can a class have an interface?

929


what is mutual exclusion? How can you take care of mutual exclusion using java threads? : Java thread

1075


How many types of keywords are there?

945


What are disadvantages of java?

962


What is the primitive type short?

984


What is private protected in java?

998


Can we define private and protected modifiers for the members in interfaces?

1048


Difference between throw and throws?

1055


Is a boolean variable?

968