A PHP Error was encountered

Severity: Warning

Message: fopen(/var/lib/php/sessions/ci_sessionb2l2dth57atbccjpt4hlgltf904kiqj6): failed to open stream: No space left on device

Filename: drivers/Session_files_driver.php

Line Number: 176

Backtrace:

File: /var/www/interviewmania.com/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: Warning

Message: session_start(): Failed to read session data: user (path: /var/lib/php/sessions)

Filename: Session/Session.php

Line Number: 143

Backtrace:

File: /var/www/interviewmania.com/index.php
Line: 315
Function: require_once

What is the output of this program?class N extends Thread

Home » JAVA Programming » Multithreading » Question
  1. What is the output of this program?
    class N extends Thread
    {
    Thread thread;
    String Str;
    N(String ThreadName)
    {
    Str = ThreadName;
    thread = new Thread(this,Str);
    thread.start();
    }
    public void run()
    {
    }

    }

    public class multithreading_Example
    {
    public static void main(String args[])
    {
    N object1 = new N("First");
    N object2 = new N("Second");
    try
    {
    object1.thread.wait();
    System.out.print(object1.thread.isAlive());
    }
    catch(Exception e)
    {
    System.out.print("Running Main Thread...");
    }
    }
    }
    1. First
    2. Second
    3. Running Main Thread...
    4. All of above
    5. None of these
Correct Option: C

object1.thread.wait() causes main thread to go out of processing in sleep state hence causes exception and “Main thread interrupted” is printed.



Your comments will be displayed only after manual approval.