• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Valid Question ???

 
Ranch Hand
Posts: 99
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
.
Which can be used to accept charS from input.
1. java.io.CharArrayReader
2. java.io.InputStreamReader
3. java.io.OutputStreamReader
4. java.io.FileReader.
I was confused by the use of charS , which was not shown as primitive type or an object reference.
Question is just this much. I answered it as java.io.InputStreamReader and hope I got it wrong.
Do u have any clue ?
 
Ranch Hand
Posts: 133
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Binu,
I think the question meant 'chars' as 'characters'. Anyway, option (2) is correct, assuming what it meant by 'input' is standard input (System.in).
Btw, I think you mean 'hope I got it right
 
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I think option 1 is right. The question only asks for a class which could accept charS from input. If the "charS" denotes characters, it means those classes which could take in characters as input. Option 1, ie. CharArrayReader does exactly the explained scenario by accepting a char[] as input. If multiple answers are expected, I will prefer to choose 1,2 and 4, because all these Readers could be used for reading characters. But if this question demands single answer, I would prefer to adhere to option 1.
regards Jacob
[ August 22, 2002: Message edited by: Jacob George ]
 
You save more money with a clothesline than dozens of light bulb purchases. Tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic