State Street Interview Question

1)why is string immutable 2)difference between stringBuffer and string builder 3)how does hashmap work 4)what is checked and runtime exception 5)what are the implicit objects in JSP 6)what are the annotation used in web services 7)what are steps required for jdbc connection in java 8)what is the difference between MVC and web services 9)explain the hierarchy of exception 10)what is proxy design pattern and builder pattern

Interview Answer

Anonymous

May 21, 2017

1) because the class is final 2)string buffer is thread safe and string builder is not 3)hash map works based on key value pair if key is not present then insert in hashmap else override the value present in key 4) checked exception are which can be handeled by the programmer like. IO exception and run time exception can not be handled like runtime exception 5)the implicit object in JSP are Http servlet request and response 6)@reatcontroller,@ requestbody and @responsebody 7)create properties object containing username,password,db name then set in connection object and use prepared statement to create query 8)MVC-model view controller ---> controller-->to-->create model object -->add it view-->return view as a response 9)Throwable class contains error and exeption 10) refer material

1