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

Can we pass a primitive type by reference in java? How

532


What is lossy conversion in java?

563


Is ++ operator thread-safe in java?

636


os is developed in c no java is more secured then c na why dont the os developed is developed using java

3525


What is java thread dump, how can we get java thread dump of a program?

575






What is flush () in java?

557


give an example for encapsulation?

582


What is the difference between java applets and applications?

568


what type of questions asked for barclays technologies pune please send urgent

5230


How can I right-justify a string?

629


Difference between a process and a program?

616


What is command line argument

710


What is use of valueof () in java?

563


Can you call a method in a method?

533


Explain about the select method with an example?

591