abalfazl hossein wrote:
This looks more like a blog post
No!
I want to be sure, I asked a Generic class and I write an example, But after I post here one friend told me using of generic is pointless in your example!
Adam Preston wrote:ohhhhhhhhhhh i get it now... so if (i) was equal to 124 you would put 'case 124'??
I am assuming in that situation it would probs be easier to use if else if ladder???
chaitanya karthikk wrote:Hi Henry I dint understand what you said. And please tell me what I quoted about multiple inheritance is correct or wrong.
Thank you in advance.
Ernest Friedman-Hill wrote:It's a fundamentally flawed question, as standard JVMs have half-a-dozen or more threads running on startup, and that's not even counting the GUI event thread. Depending on which GC implementation is running, garbage collection can take as few as one or as many as three or more threads all by itself. There's also a Finalizer thread, a "Reference Handler" thread, a "Signal Dispatcher" thread, a "Low Memory Detector" thread, and the main thread, of course. There may also be Hotspot compiler threads!
I would imagine that the simple-minded "the main thread and the GC thread" is what the interviewer was looking for.
Every application has at least one thread — or several, if you count "system" threads that do things like memory management and signal handling.
Alex Hurtt wrote:Assuming the application has no GUI, could the other answer be the main thread and the garbage collector? I would assume you'd have at least one garbage collector for each JVM process. (In other words, using Windows as an example, for each instance of the java.exe/javaw.exe process, one garbage collector).
When a Java Virtual Machine starts up, there is usually a single non-daemon thread (which typically calls the method named main of some designated class). The Java Virtual Machine continues to execute threads until either of the following occurs:
But from the application programmer's point of view, you start with just one thread, called the main thread. This thread has the ability to create additional threads, as we'll demonstrate in the next section.
public void validate()Validates this container and all of its subcomponents.
The validate method is used to cause a container to lay out its subcomponents again. It should be invoked when this container's subcomponents are modified (added to or removed from the container, or layout-related information changed) after the container has been displayed.
Overrides:
validate in class Component
See Also:
add(java.awt.Component), Component.invalidate(), JComponent.revalidate()