Pages

Friday, June 18, 2010

p-7





Answer : D
Explanation : The number of black dots in each grid increases by 1 each time, starting with the top left grid and working to the right, top row then bottom row.

V-2

Find Synonyms:

INDICT

A.Condemn
B.Reprimand
C.Accuse
D.Allege



Answer: Option C
Explanation:
Meanings: formally accuse of a crime (Law); accuse, charge, criticize
-Page-1

Authentication and Authorization

Authentication
An authentication system is how you identify yourself to the computer. The goal behind an authentication system is to verify that the user is actually who they say they are. There are many ways of authenticating a user. Any combination of the following are good examples.
Password based authentication
Requires the user to know some predetermined quantity (their password).
  • Advantages: Easy to impliemnt, requires no special equipemnt.
  • Disadvantages: Easy to forget password. User can tell another user their password. Password can be written down. Password can be reused.
  • Device based authentication
    Requires the user to posses some item such as a key, mag strip, card, s/key device, etc.
  • Advantages: Difficult to copy. Cannot forget password. If used with a PIN is near useless if stolen.
  • Disadvantages: Must have device to use service so the user might forget it at home. Easy target for theft. Still doesn't actually actively identify the user.

  • Biometric Authentication
  • My voice is my passport. Verify me. This is from the movie sneakers and demonstrates one type of biometric authentication device. It identifies some physical charactistic of the user that cannot be seperated from their body.


    Retina Scanners:
  • Advantages: Accurately identifies the user when it works.
  • Disadvantages: New technology that is still evolving. Not perfect yet.



  • Hand Scanners:
  • Advantages: Difficult to seperate from the user. Accurately identifies the user.
  • Disadvantages: Getting your hand stolen to break into a vault sucks a lot more than getting your ID card stolen.





  • Authorization
    Once the system knows who the user is through authentication, authorization is how the system decides what the user can do. A good example of this is using group permissions or the difference between a normal user and the superuser on a unix system. There are other more compicated ACL (Access Control Lists) available to decide what a user can do and how they can do it. Most unix systems don't impliment this very well (if at all.)
    _______________ 
    In Short:
    Identification: Who are you?  Authentication: Prove it.   Authorization: Here is what you can do.

    Thursday, June 17, 2010

    A-2


    A person crosses a 600 m long street in 5 minutes. What is his speed in km per hour?


    A. 3.6
    B. 7.2
    C. 8.4
    D. 10

    Answer: Option B

    Explanation:

    Speed = [600/(5 x 60)]m/sec.= 2 m/sec.

    Converting m/sec to km/hr (see important formulas section)

    = [2 x (18/5)]km/hr

    = 7.2 km/hr.

    Thursday, June 10, 2010

    AJ-1:

    What is a transient variable?
    A transient variable is a variable that may not be serialized.

    Which containers use a border Layout as their default layout?
    The Window, Frame and Dialog classes use a border layout as their default layout.

    Why do threads block on I/O?
    Threads block on I/O (that is enters the waiting state) so that other threads may execute while the I/O Operation is performed.

    How are Observer and Observable used?
    Objects that subclass the Observable class maintain a list of observers. When an Observable object is updated it invokes the update() method of each of its observers to notify the observers that it has changed state. The Observer interface is implemented by objects that observe Observable objects.

    What is synchronization and why is it important?
    With respect to multithreading, synchronization is the capability to control the access of multiple threads to shared resources. Without synchronization, it is possible for one thread to modify a shared object while another thread is in the process of using or updating that object's value. This often leads to significant errors.

    Can a lock be acquired on a class?
    Yes, a lock can be acquired on a class. This lock is acquired on the class's Class object..

    Database


    Advanced Java

    -Page-1

    -Page-2

    JB-1:

    What is the difference between a constructor and a method?A constructor is a member function of a class that is used to create objects of that class. It has the same name as the class itself, has no return type, and is invoked using the new operator.
    A method is an ordinary member function of a class. It has its own name, a return type (which may be void), and is invoked using the dot operator.

    What is the purpose of garbage collection in Java, and when is it used?
    The purpose of garbage collection is to identify and discard objects that are no longer needed by a program so that their resources can be reclaimed and reused.
    A Java object is subject to garbage collection when it becomes unreachable to the program in which it is used.

    Describe synchronization in respect to multithreading.
    With respect to multithreading, synchronization is the capability to control the access of multiple threads to shared resources.
    Without synchonization, it is possible for one thread to modify a shared variable while another thread is in the process of using or updating same shared variable. This usually leads to significant errors.

    What is an abstract class?
    Abstract class must be extended/subclassed (to be useful). It serves as a template. A class that is abstract may not be instantiated (ie. you may not call its constructor), abstract class may contain static data.
    Any class with an abstract method is automatically abstract itself, and must be declared as such. A class may be declared abstract even if it has no abstract methods. This prevents it from being instantiated.

    What is the difference between an Interface and an Abstract class?
    An abstract class can have instance methods that implement a default behavior. An Interface can only declare constants and instance methods, but cannot implement default behavior and all methods are implicitly abstract.
    An interface has all public members and no implementation. An abstract class is a class which may have the usual flavors of class members (private, protected, etc.), but has some abstract methods.

    Explain different way of using thread?
    The thread could be implemented by using runnable interface or by inheriting from the Thread class. The former is more advantageous, 'cause when you are going for multiple inheritance, the only interface can help.

    Java Basics

    Page-1

    CJ-2:

    What is the base class of all classes?
    java.lang.Object

    Does Java support multiple inheritance?
    Java doesn't support multiple inheritance.

    Is Java a pure object oriented language?
    Java uses primitive data types and hence is not a pure object oriented language.

    Are arrays primitive data types?
    In Java, Arrays are objects.

    What is difference between Path and Classpath?
    Path and Classpath are operating system level environment variales. Path is used define where the system can find the executables(.exe) files and classpath is used to specify the location .class files.

    What are local variables?
    Local varaiables are those which are declared within a block of code like methods. Local variables should be initialised before accessing them.

    Core java

    -Page-1

    -Page-2

    -page-3

    CJ-1:

    What is the most important feature of Java?
    Java is a platform independent language.

    What do you mean by platform independence?
    Platform independence means that we can write and compile the java code in one platform (eg Windows) and can execute the class in any other supported platform eg (Linux,Solaris,etc).

    What is a JVM?
    JVM is Java Virtual Machine which is a run time environment for the compiled java class files.

    Are JVM's platform independent?
    JVM's are not platform independent. JVM's are platform specific run time implementation provided by the vendor.

    What is the difference between a JDK and a JVM?
    JDK is Java Development Kit which is for development purpose and it includes execution environment also. But JVM is purely a run time environment and hence you will not be able to compile your source files using a JVM.

    6. What is a pointer and does Java support pointers?
    Pointer is a reference handle to a memory location. Improper handling of pointers leads to memory leaks and reliability issues hence Java doesn't support the usage of pointers.

    V-1:

    Read the each sentence to find out whether there is any grammatical error in it. The error, if any will be in one part of the sentence.

    A. The brakes and steering failed
    B. and the bus ran down the hill
    C.
    without anyone being able control it.
    D. No error.


    Answer: Option C
    Explanation:
    without being controlled by anyone

    A-1:


    A train 360 m long is running at a speed of 45 km/hr. In what time will it pass a bridge 140 m long?
    A.
    40 sec
    B. 42 sec
    C. 45 secD. 48 sec



    Answer: Option A
    Explanation:


    Formula for converting from km/hr to m/s:   X km/hr = X x 5 m/s.
    18

    Therefore, Speed = 45 x 5 m/sec = 25 m/sec.
    18 2
    Total distance to be covered = (360 + 140) m = 500 m.

    Formula for finding Time = Distance
    -----------
    Speed
    Required time = 500 x 2
    ---------
    sec = 40 sec.
    25

    P-4:



    Answer : 16
    Explanation : Starting bottom left and moving clockwise around the triangle, numbers follow the sequence of Square Numbers.

    p-3:



    Answer: 19


    Explanation: As you move diagonally down, numbers follow the sequence of Prime Numbers.

    P-2:





    Answer : 9
    Explanation : The number at the centre of each triangle equals the sum of the lower two numbers minus the top number.

    P-1:




    Answer : 6
    Explanation : Looking at the diagram in rows, the central circle equals half the sum of the numbers in the other circles to the left and right of the centre.