• 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 ...
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
  • Mikalai Zaikin

A few questions, any takers

Ranch Hand
Posts: 87
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Dear guys,
please spare sometime and help me with these questions:
#1. Given a TextArea using a proportional pitch font and constructed like this:
TextArea t = new TextArea("12345", 5, 5);
Which statement is true?
A. The displayed width shows exactly five characters on each line unless otherwise constrained.
B. The displayed height is five lines unless otherwise constrained.
C. The maximum number of characters in a line will be five.
D. The user will be able to edit the character string.
E. The displayed string can use multiple fonts.
Answers given:B, D
IMHO: Heeeeeeeeeeelppppppppppppp!!!
#2. FilterInputStream is the parent class for BufferedInputStream and DataInputStream. Which classes are a valid argument for the constructor of a FilterInputStream?
A. File
B. InputStream
C. OutputStream
D. FileInputStream
E. RandomAccessFile
Answer given: B
#3. What might cause the current thread to stop executing.
A. An InterruptedException is thrown.
B. The thread executes a wait() call.
C. The thread constructs a new Thread.
D. A thread of higher priority becomes ready.
E. The thread executes a waitforID() call on a MediaTracker.
Answer given: B, D, E
IMHO: B, C (the wording of the question says MIGHT, so imagine a scenario where a thread spawns a new thread and assigns it a priority higher than itself !!!), D, E
#4. What is true about threads that stop executing?
A. When a running thread's suspend() method is called, then it is possible for the thread to indefinitely remain suspended.
B. The interpreter stops when the main method stops.
C. A thread can stop executing when another thread is in a runnable state.
Answer given: C
IMHO: A, B (The main method should be last to finish or else the system may hang), C
BTW, I find the wording of many a questions in online mock testsvery ambigous. I suppose this is not the case in the real thing. Can a experienced hand clarify (and pacify!!!)
Thanx in adv.
A day job? In an office? My worst nightmare! Comfort me tiny ad!
a bit of art, as a gift, the permaculture playing cards
    Bookmark Topic Watch Topic
  • New Topic