Java Concurrency and Session Management

Description

Java Concurrency and Session Management
Carlos Veliz
Quiz by Carlos Veliz, updated more than 1 year ago
Carlos Veliz
Created by Carlos Veliz over 9 years ago
117
0

Resource summary

Question 1

Question
Concurrency in Java. Which is not a state of a thread?
Answer
  • Dead
  • Sleeping
  • Pause
  • Running
  • Resumed

Question 2

Question
"Determines if the thread is running or not". This statement is describing:
Answer
  • IsAlive()
  • Stop()
  • isDaemon()
  • run()
  • start()

Question 3

Question
In Java, the following methods are vulnerable to race condition:
Answer
  • start(), stop(), init(), wait(), pause()
  • start(), stop(), time(), init(), destroy()
  • notifiyAll(), notify() syncronized, java.lang.thread
  • stop(), isDaemon(), getThreadGroup()
  • none of the above

Question 4

Question
Which of the following statements is for the use of ThreadPool instead of ThreadGroup?
Answer
  • 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

Question 5

Question
When an object is built and then occurs: the race condition, improper initialization and leaks, it is because:
Answer
  • 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

Question 6

Question
Which statement is not a prevention technique DeadLock?
Answer
  • DeadLock detection
  • Lock Timeout
  • Ordering of Locks
  • Deadlock mutable
  • None of the above

Question 7

Question
Which of the following is not a safe practice for handling threads?
Answer
  • Use join() method
  • Setting priorities for threads
  • Ordering of Locks
  • Avoid publishing "this" reference during construction
  • Document the order

Question 8

Question
Check the statement that is not a type of session hijacking attack:
Answer
  • User enumeration
  • Stealing Session ID through HTTP Get request
  • Attack using Client-Side Scripting
  • Session Fixation
  • Attack through HTTP Header response

Question 9

Question
Indicate which are the guidelines for Secured sessions Management :
Answer
  • Password Strength
  • Password Storage
  • Password Use
  • Browser Caching
  • All of the above

Question 10

Question
"Date formats in java are not synchronized". This feature belongs to:
Answer
  • Race condition prevention
  • DateFormat in multi-threaded environment
  • Use join() method
  • Document the order
  • Setting priorities for threads
Show full summary Hide full summary

Similar

Introduction to Java Security
Carlos Veliz
Java Mix Test 42p
Carlos Veliz
Authentication and Authorization
Carlos Veliz
ECSP JAVA: JAAS
Carlos Veliz
Criptography
Carlos Veliz
Java - Mix
Carlos Veliz
Java Application Vulnerabilities
Carlos Veliz
Java Mix Test 42p
Jose Luis Vasquez Galvez
Tectonic Hazards flashcards
katiehumphrey
20 Study Hacks To Improve Your Memory
jen.sch.ca
Biology (B2)
Sian Griffiths