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...

Read data from console and print in one file. That would be
in C:\temp ? Thanks, Bose

Answer Posted / avi

@Pushpa...
If u r reading console data from the method other than main() then u need to use Console class and scanner.

And use StringBuffer in place of String as when u r using '+' operator it creates new string object. So use StringBuffer and use API append("").

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the purpose of file class?

974


Class c implements interface I containing method m1 and m2 declarations. Class c has provided implementation for method m2. Can I create an object of class c?

1555


What are the important features of Java 10 release?

964


Why are lists ordered in java?

971


What is the method in java?

1040


What is Java Shutdown Hook?

1131


Why are pointers not secure?

982


What is get () in java?

984


what are the states associated in the thread? : Java thread

1003


Can an interface have a constructor?

908


Is alive in java?

903


what is object slice?

2016


How do you square a number in java?

1015


What is the default value of the local variables?

970


Differentiate between array list and vector in java.

1075