Sunday, 24 June 2018

TCS Tech Lounge JAVA Final-17

If the client has disabled cookie in the browser, which session management mechanism could the web container employ?
ANS: Session Management using URL Rewriting

class Super{
            void show(){
                        System.out.println("parent");
            }
}
public class Sub extends Super{
            void show()throws IOException{
                        System.out.println("Child");
            }
            public static void main(String[]args){
                        Super s = new Sub();
                        s.show();
            }
}
ANS: compile error

StringBuffer Objects are mutable objects?
ANS: True


public class Operators1{
            public static void main(String[]args){
                        double x=6;
                        int y=5,z=2;
                        x=y++ + ++x/z;
                        System.out.println(x);
            }
}
ANS: 8.5

Automatically when the view is dropped.
E. The OR REPLACE option is used to change the definition of an existing view without dropping and recreating it.
F. The WITH CHECK OPTION constraint can be used in a view definition to restrict the columns displayed through the view.

Which of the following must be true of the object thrown by a thrown statement?
ANSIt must be assignable to the Throwable type

What will this code print?
Int arr[] = new int[5];
System.out.print(arr);
ANS: Garbage Value

What does read(char[] cbuf, int off, int len) of InputStreamreader do?
ANS: Reads characters into a portion of an array

The default initial values of the data members in Employee class for string name and int id are
ANS: null, 0

Which class handle any type of request so it is protocol-independent?
ANS: GenericServlet

Java is a_ _ __ independent language.
Ans: Platform

 What is the return type of skipByte() func in DataInputStream class?
ANS: int

Aceess modifier can beused for local variables
Ans: false


Which of the following languages is more suited to a structured program?
Ans: Pascal

What is the limit of data to be passed from HTML when doGet() method is used?
ANS: 2k

Switch(x){
Default: System.out.println(“Hello”);
}
Which two are acceptable types of for x?
1.      byte
2.      long
3.      char
4.      float
5.      Short
6.      Long
ANS: 1 and 3

For a 2 tier architecture
1.      Presentation layer in one machine and Business & Resource layer is available in different machine.
2.      Presentation & Business layer in one machine and Resource layer in another machine. Which of the below statements Is true.
ANS: Both statements are true

2 comments:

  1. Thanks for sharing this informative content , Great work
    Leanpitch provides online training in advanced scrum master during this lockdown period everyone can use it wisely.
    Advanced CSM training online

    ReplyDelete
  2. Thanks for sharing this informative content , Great work
    Leanpitch provides online training in Product prototyping during this lockdown period everyone can use it wisely.
    icp-cat training

    ReplyDelete