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 are the different tags provided in jstl?

774


What is garbage collector?

833


How are java objects passed to a method and what are native methods?

851


Is singleton a bad practice?

828


Why hashset is used in java?

776


Does a class inherit the constructors of its superclass in java programming?

759


What is the function of http?

789


What is size_t?

762


Which one of the following suits the description of a string better: derived or primitive?

753


What does you mean in math?

801


What is a java applet? What is an interface?

874


what is deadlock? : Java thread

760


What is Java Reflection API? Why it’s so important to have?

873


What are the kinds of polymorphism?

842


Can a class with private constructor be extended?

720