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

Why string is a class?

890


How to remove the trailing spaces from a string?

1167


Is singleton class immutable?

907


What is string data?

938


Can you create an object of an abstract class?

943


Why do we use return statement?

965


What is the loop in java?

1044


What is difference between hashset and hashmap in java?

931


What is the symbol for line break?

1031


What do you mean by default constructor in java?

1010


Why hashmap is used in java?

1007


What is the static field modifier?

1061


Is string passed by reference in java?

951


Explain the use of sublass in a java program?

972


What is parse method?

956