Carlos Veliz
Quiz by , created more than 1 year ago

Java Concurrency and Session Management

102
0
0
Carlos Veliz
Created by Carlos Veliz almost 9 years ago
Close

Java Concurrency and Session Management

Question 1 of 10

1

Concurrency in Java. Which is not a state of a thread?

Select one of the following:

  • Dead

  • Sleeping

  • Pause

  • Running

  • Resumed

Explanation

Question 2 of 10

1

"Determines if the thread is running or not". This statement is describing:

Select one of the following:

  • IsAlive()

  • Stop()

  • isDaemon()

  • run()

  • start()

Explanation

Question 3 of 10

1

In Java, the following methods are vulnerable to race condition:

Select one of the following:

  • start(), stop(), init(), wait(), pause()

  • start(), stop(), time(), init(), destroy()

  • notifiyAll(), notify() syncronized, java.lang.thread

  • stop(), isDaemon(), getThreadGroup()

  • none of the above

Explanation

Question 4 of 10

1

Which of the following statements is for the use of ThreadPool instead of ThreadGroup?

Select one of the following:

  • Using few methods of the threadgroup class is not considered thread-safe

  • Newly created thread may lead to peromance overhead

  • Controlling too may threads is not easy and might result in errors in the memory

  • A thread pool is a set of work queue of runnables and running thread connections

  • None of the above

Explanation

Question 5 of 10

1

When an object is built and then occurs: the race condition, improper initialization and leaks, it is because:

Select one of the following:

  • if "terminated" reference is not used

  • if "exception handler" is not used

  • if "this" reference is used

  • if "terminated" reference is used

  • if "this" reference is not used

Explanation

Question 6 of 10

1

Which statement is not a prevention technique DeadLock?

Select one of the following:

  • DeadLock detection

  • Lock Timeout

  • Ordering of Locks

  • Deadlock mutable

  • None of the above

Explanation

Question 7 of 10

1

Which of the following is not a safe practice for handling threads?

Select one of the following:

  • Use join() method

  • Setting priorities for threads

  • Ordering of Locks

  • Avoid publishing "this" reference during construction

  • Document the order

Explanation

Question 8 of 10

1

Check the statement that is not a type of session hijacking attack:

Select one of the following:

  • User enumeration

  • Stealing Session ID through HTTP Get request

  • Attack using Client-Side Scripting

  • Session Fixation

  • Attack through HTTP Header response

Explanation

Question 9 of 10

1

Indicate which are the guidelines for Secured sessions Management :

Select one of the following:

  • Password Strength

  • Password Storage

  • Password Use

  • Browser Caching

  • All of the above

Explanation

Question 10 of 10

1

"Date formats in java are not synchronized". This feature belongs to:

Select one of the following:

  • Race condition prevention

  • DateFormat in multi-threaded environment

  • Use join() method

  • Document the order

  • Setting priorities for threads

Explanation