SAIL Sample Technical Placement Paper

download SAIL Sample Technical Placement Paper

of 9

Transcript of SAIL Sample Technical Placement Paper

  • 7/29/2019 SAIL Sample Technical Placement Paper

    1/9

    Visit www.latestoffcampus.com for placement papers, interview tips & job updates. Toget

    freeupdates tomail http://groups.google.com/group/latestoffcampus/subscribeLive updates on

    Facebook @ www.facebook.com/LatestOffCampus

    Visit www.latestoffcampus.com for placement papers, interview tips & job updates. Toget

    freeupdates tomail http://groups.google.com/group/latestoffcampus/subscribeLive updates on

    Facebook @ www.facebook.com/LatestOffCampus

    SAIL Technical Latest Sample Placement Paper

    1. What does Option Explicit refer to?

    ANS: All variables must be declared before use. Their type is not

    required.

    2.What are the ADO objects?

    ANS: Provide a scenario using three of them to return data from a

    database. Expected answer: Connection Connects to a data source;

    contains the Errors collectionCommand Executes commands to the

    data source. Is the only object that can accept parameters for a stored

    procedure.Recordset The set of data returned from the

    database.Scenario: There are many possibilities. The most likely is as

    follows:

    Dim conn As ADODB.ConnectionDim rs As ADODB.RecordsetDim Cmd

    As ADODB.Commandconn.ConnectionString =? CONNECTION STRING?

    conn.OpenSet Cmd.ActiveConnection = connCmd.CommandText =? SQL

    STATEMENT? Set rs = Cmd.ExecuteSet rs.ActiveConnection =

    Nothingconn.Close

    3.What are some benefits of using MTS?

    ANS: Database Pooling, Transactional operations, Deployment,

    Security, Remote Execution.

    4.Dim x, y as integer. What is x and y data type?

    ANS: X as variant and y as integer.

    5.What is the Dll required for running the VB?

    ANS: Vbrun300.dll

    6.What is the diff between the Std and Class Module?

    ANS: Std Global with in the project. Cls Global throughout the all

    project only thing is we want to set the type lib. Class Modules can be

    Instantiated.

  • 7/29/2019 SAIL Sample Technical Placement Paper

    2/9

    Visit www.latestoffcampus.com for placement papers, interview tips & job updates. Toget

    freeupdates tomail http://groups.google.com/group/latestoffcampus/subscribeLive updates on

    Facebook @ www.facebook.com/LatestOffCampus

    Visit www.latestoffcampus.com for placement papers, interview tips & job updates. Toget

    freeupdates tomail http://groups.google.com/group/latestoffcampus/subscribeLive updates on

    Facebook @ www.facebook.com/LatestOffCampus

    7.What is the size of the variant data type?

    ANS: The Variant data type has a numeric storage size of 16 bytes and

    can contain data up to the range of a Decimal, or a character storagesize of 22 bytes (plus string length),and can store any character text.

    8.What are the record set types?

    ANS: RdOpenFowardOnly 0 (Default used only for the read only

    purpose)

    RdOpenStatic 1

    RdOpenDynamic 2

    RdOpenKeySet 3 (Normally used for the live project)

    9.What is DBFailError?

    ANS: Rolls Back updates if any errors Occurs.

    10.Private Dim x as integer. Valid?

    ANS: Private cannot be used in front of DIM.

    11.Can we able to set Instancing properties like Singleuse,

    GlobalSingleuse to ActiveXDll?

    ANS: No.

    12.What are properties available in Clip Board?

    ANS: No Properties Available. Only the methods they are SetText,

    GetText, Setdata (), Getformat (), Clear.

    13.What the RDO Methods and Events?

    ANS: Methods Events

    Begin Trans ValidateCommit Trans Reposition

    Rollback Trans Error

    Cancel Query Complied

    Refresh

  • 7/29/2019 SAIL Sample Technical Placement Paper

    3/9

    Visit www.latestoffcampus.com for placement papers, interview tips & job updates. Toget

    freeupdates tomail http://groups.google.com/group/latestoffcampus/subscribeLive updates on

    Facebook @ www.facebook.com/LatestOffCampus

    Visit www.latestoffcampus.com for placement papers, interview tips & job updates. Toget

    freeupdates tomail http://groups.google.com/group/latestoffcampus/subscribeLive updates on

    Facebook @ www.facebook.com/LatestOffCampus

    Update Controls

    Update row

    14.What is MAPI?

    ANS: Messaging Application programming Interface.

    15.What are the locks available in Visual Basic?

    ANS: Locking is the process by which a DBMS restricts access to a row in

    multi-user environment 4 types of locks. They are

    1. Batch Optimistic

    2. Optimistic

    3. Pessimistic4. Read Only

    Operations in a relational database act on a complete set of rows. The

    set of rows returned by a SELECT statement consists of all the rows that

    satisfy the conditions in the WHERE clause of the statement. This

    complete set of rows returned by the statement is known as the result

    set.

    Applications, especially those that are interactive and online, cannot

    always work effectively with the entire result set as a unit.These applications need a mechanism to work with one row or a small

    block of rows at a time. Cursors are an extension to result sets that

    provide that mechanism.

    Cursor or lock type Advantages Disadvantages AdOpenForwardOnly

    (Default) Low resource requirements Cannot scroll backward No data

    concurrency AdOpenStatic Scrollable (Wont detect changes made at

    the same time by another application) No data concurrency

    AdOpenKeyset Some data concurrency Scrollable Higher resource

    requirements Not available in disconnected scenario AdOpenDynamic

    High data concurrency Scrollable Highest resource requirements Not

    available in disconnected scenario AdLockReadOnly Low resource

    requirements Highly scalable Data not updatable through cursor

  • 7/29/2019 SAIL Sample Technical Placement Paper

    4/9

    Visit www.latestoffcampus.com for placement papers, interview tips & job updates. Toget

    freeupdates tomail http://groups.google.com/group/latestoffcampus/subscribeLive updates on

    Facebook @ www.facebook.com/LatestOffCampus

    Visit www.latestoffcampus.com for placement papers, interview tips & job updates. Toget

    freeupdates tomail http://groups.google.com/group/latestoffcampus/subscribeLive updates on

    Facebook @ www.facebook.com/LatestOffCampus

    AdLockBatchOptimistic Batch updates Allows disconnected scenarios

    Other users able to access data Data can be changed by multiple users

    at once AdLockPessimistic Data cannot be changed by other users while

    locked Prevents other users from accessing data while locked

    AdLockOptimistic Other users able to access data Data can be changed

    by multiple users at once.

    16.What is Tabstrip control?

    ANS: Libraries of procedure external to the application but can be

    called from the application.

    17.What is DBSqlPassThrough?

    ANS: It will By Passing the Jet Query Processor.

    18.What is the difference between a constructor and a method?

    ANS: 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.

    19.What is the starting Index value? How to locate it?

    ANS: It is tab control to place our controls with in the form in multiple

    sheets.

    Index starts with 1.

    And to identify If Tabstrip1.SelectedItem.

    Index = 1 Then..

    End if

    20.What is keyword used to compare to objects?

    ANS: ISOperator Returns Boolean.

    21.Where will we give the option explicit keyword and for what?

    ANS: In the general declarations section. To trap undeclared variables.

  • 7/29/2019 SAIL Sample Technical Placement Paper

    5/9

    Visit www.latestoffcampus.com for placement papers, interview tips & job updates. Toget

    freeupdates tomail http://groups.google.com/group/latestoffcampus/subscribeLive updates on

    Facebook @ www.facebook.com/LatestOffCampus

    Visit www.latestoffcampus.com for placement papers, interview tips & job updates. Toget

    freeupdates tomail http://groups.google.com/group/latestoffcampus/subscribeLive updates on

    Facebook @ www.facebook.com/LatestOffCampus

    22.What is Implicit?

    ANS: Instance of specific copy of a class with its own settings for the

    properties defined in that class.Note: The implicitly defined variable is never equal to nothing.

    23.What is the return type of Instr and Strcmp?

    ANS: Instr integer (Numeric position)

    Strcmp - integer ( if both the string are equal they result = 0)

    Strcmp (Str1, Str2, Comparetype)

    Comparing mode = 0 Binary Comparing 1 Textual Comparing.

    24.What is Iterators?

    ANS: Some of the collection classes provide traversal of their contents

    via a java.util.Iterator interface. This interface allows you to walk a

    collection of objects, operating on each object in turn. Remember when

    using Iterators that they contain a snapshot of the collection at the time

    the Iterator was obtained; generally it is not advisable to modify the

    collection itself while traversing an Iterator.

    25.State the significance of public, private, protected, default modifiers

    both singly and in combination and state the effect of packagerelationships on declared items qualified by these modifiers?

    ANS: public: Public class is visible in other packages, field is visible

    everywhere (class must be public too) private: Private variables or

    methods may be used only by an instance of the same class that

    declares the variable or method, A private feature may only be

    accessed by the class that owns the feature.protected: Is available to all

    classes in the same package and also available to all subclasses of the

    class that owns the protected feature. This access is provided even to

    subclasses that reside in a different package from the class that owns

    the protected feature.default: What you get by default i.e., without any

    access modifier (ie, public private or protected).It means that it is

    visible to all within a particular package.

  • 7/29/2019 SAIL Sample Technical Placement Paper

    6/9

    Visit www.latestoffcampus.com for placement papers, interview tips & job updates. Toget

    freeupdates tomail http://groups.google.com/group/latestoffcampus/subscribeLive updates on

    Facebook @ www.facebook.com/LatestOffCampus

    Visit www.latestoffcampus.com for placement papers, interview tips & job updates. Toget

    freeupdates tomail http://groups.google.com/group/latestoffcampus/subscribeLive updates on

    Facebook @ www.facebook.com/LatestOffCampus

    26.What is an abstract class?

    ANS: Abstract class must be extended/subclassed (to be useful). It

    serves as a template. A class that is abstract may not be instantiated(i.e., 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.

    27.What is static in java?

    ANS: Static means one per class, not one for each object no matter how

    many instance of a class might exist. This means that you can use them

    without creating an instance of a class. Static methods are implicitly

    final, because overriding is done based on the type of the object, and

    static methods are attached to a class, not an object. A static method in

    a superclass can be shadowed by another static method in a subclass,

    as long as the original method was not declared final. However, you

    cant override a static method with a nonstatic method. In other words,

    you cant change a static method into an instance method in a subclass.

    28.What is Externalizable interface?ANS: Externalizable is an interface which contains two methods

    readExternal and writeExternal. These methods give you a control over

    the serialization mechanism. Thus if your class implements this

    interface, you can customize the serialization process by implementing

    these methods.

    29.Do I need to import java.lang package any time? Why?

    ANS: No. It is by default loaded internally by the JVM.

    30.How can we call Stored procedure of Back End in RDO and ADO ?

    ANS: In RDO We can call using RDO Query Objects.

    In ADO We can call using Command Objects.

  • 7/29/2019 SAIL Sample Technical Placement Paper

    7/9

    Visit www.latestoffcampus.com for placement papers, interview tips & job updates. Toget

    freeupdates tomail http://groups.google.com/group/latestoffcampus/subscribeLive updates on

    Facebook @ www.facebook.com/LatestOffCampus

    Visit www.latestoffcampus.com for placement papers, interview tips & job updates. Toget

    freeupdates tomail http://groups.google.com/group/latestoffcampus/subscribeLive updates on

    Facebook @ www.facebook.com/LatestOffCampus

    31.Can I have multiple main methods in the same class?

    ANS: No the program fails to compile. The compiler says that the main

    method is already defined in the class.32.Can I import same package/class twice?

    Will the JVM load the package twice at runtime?

    ANS: One can import the same package or same class multiple times.

    Neither compiler nor JVM complains abt it. And the JVM will internally

    load the class only once no matter how many times you import the

    same class.

    33.Difference between Vector and ArrayList?

    ANS: Vector is synchronized whereas arraylist is not.

    34.What are pass by reference and passby value?

    ANS: Pass By Reference means the passing the address itself rather

    than passing the value. Passby Value means passing a copy of the value

    to be passed.

    35.Explain different way of using thread?

    ANS: The thread could be implemented by using runnable interface orby inheriting from the Thread class. The former is more advantageous,

    because when we are going for multiple inheritance. The only interface

    can help.

    36.What is mutual exclusion? How can you take care of mutual

    exclusion using Java threads?

    ANS: Mutual exclusion is where no two processes can access critical

    regions of memory at the same time. Java provides many utilities to

    deal with mutual exclusion with the use of threaded programming.For mutual exclusion, you can simply use the synchronized keyword

    and explicitly or implicitly provide an Object, any Object, to synchronize

    on.

    The runtime system/Java compiler takes care of the gruesome details

  • 7/29/2019 SAIL Sample Technical Placement Paper

    8/9

    Visit www.latestoffcampus.com for placement papers, interview tips & job updates. Toget

    freeupdates tomail http://groups.google.com/group/latestoffcampus/subscribeLive updates on

    Facebook @ www.facebook.com/LatestOffCampus

    Visit www.latestoffcampus.com for placement papers, interview tips & job updates. Toget

    freeupdates tomail http://groups.google.com/group/latestoffcampus/subscribeLive updates on

    Facebook @ www.facebook.com/LatestOffCampus

    for you. The synchronized keyword can be applied to a class, to a

    method, or to a block of code. There are several methods in Java used

    for communicating mutually exclusive threads such as wait ( ), notify ( ),

    or notifyAll ( ). For example, the notifyAll ( ) method wakes up all

    threads that are in the wait list of an object.

    37.What are some advantages and disadvantages of Java Sockets?

    ANS: Some advantages of Java Sockets:

    Sockets are flexible and sufficient. Efficient socket based programming

    can be easily implemented for general communications.

    Sockets cause low network traffic. Unlike HTML forms and CGI scripts

    that generate and transfer whole web pages for each new request, Javaapplets can send only necessary updated information.

    Some disadvantages of Java Sockets:

    Security restrictions are sometimes overbearing because a Java applet

    running in a Web browser is only able to establish connections to the

    machine where it came from, and to nowhere else on the network

    Despite all of the useful and helpful Java features, Socket based

    communications allows only to send packets of raw data between

    applications. Both the client-side and server-side have to provide

    mechanisms to make the data useful in any way.

    Since the data formats and protocols remain application specific, the

    re-use of socket based implementations is limited.

    38.What are different types of inner classes?

    ANS: They are Nested -level classes, Member classes, Local classes,

    Anonymous classes

    Nested -level classes- If you declare a class within a class and specifythe static modifier, the compiler treats the class just like any other -

    level class. Any class outside the declaring class accesses the nested

    class with the declaring class name acting similarly to a package. eg,

    outer.inner. -level inner classes implicitly have access only to static

  • 7/29/2019 SAIL Sample Technical Placement Paper

    9/9

    Visit www.latestoffcampus.com for placement papers, interview tips & job updates. Toget

    freeupdates tomail http://groups.google.com/group/latestoffcampus/subscribeLive updates on

    Facebook @ www.facebook.com/LatestOffCampus

    Visit www.latestoffcampus.com for placement papers, interview tips & job updates. Toget

    freeupdates tomail http://groups.google.com/group/latestoffcampus/subscribeLive updates on

    Facebook @ www.facebook.com/LatestOffCampus

    variables. There can also be inner interfaces. All of these are of the

    nested -level variety.

    Member classes Member inner classes are just like other member

    methods and member variables and access to the member class is

    restricted, just like methods and variables. This means a public member

    class act similarly to a nested -level class. The primary difference

    between member classes and nested -level classes is that member

    classes have access to the specific instance of the enclosing class.

    Local classes Local classes are like local variables, specific to a block of

    code. Their visibility is only within the block of their declaration. In

    order for the class to be useful beyond the declaration block, it wouldneed to implement a more publicly available interface. Because local

    classes are not members; the modifiers public, protected, private, and

    static are not usable.

    Anonymous classes Anonymous inner classes extend local inner

    classes one level further. As anonymous classes have no name, you

    cannot provide a constructor.

    39.What is the difference between declaring a variable and defining a

    variable?ANS: In declaration we just mention the type of the variable and its

    name. We do not initialize it. But defining means declaration +

    initialization. E.g. String s; is just a declaration while String s = new

    String (abcd); Or String s = abcd; are both definitions.

    40.What is the default value of an object reference declared as an

    instance variable?

    ANS: Null unless we define it explicitly.