Posts

Showing posts from August, 2013

JSON interview questions and answer

Questions : 1 What is The JSON(JavaScript Object Notation) ? Answers : 1 JavaScript Object Notation (JSON)  is a lightweight text-based open standard designed for human-readable data interchange. It is derived from the JavaScript programming language for representing simple data structures and associative arrays, called objects. And JSON is language-independent, with parsers available for virtually every programming language. Uses conventions that are familiar to programmers of the C-family of languages, including C, C++, C#, Java, JavaScript, Perl, Python,php The JSON format is often used for serializing and transmitting structured data over a network connection. When third party data interchane(REST Services) then JSON may used there LIKE SHOP .It is primarily used to transmit data between a server and web application, serving as an alternative to XML.     Questions : 2 Who is the Father or creater of JSON ? Answers : 2 Douglas Crockford called as the Father o...

Spring interview questions and answers

Questions : 1 What is IOC (or Dependency Injection)? Answers : 1 The basic concept of the Inversion of Control pattern (also known as dependency injection) is that you do not create your objects but describe how they should be created. You don't directly connect your components and services together in code but describe which services are needed by which components in a configuration file. A container (in the case of the Spring framework, the IOC container) is then responsible for hooking it all up. i.e., Applying IoC, objects are given their dependencies at creation time by some external entity that coordinates each object in the system. That is, dependencies are injected into objects. So, IoC means an inversion of responsibility with regard to how an object obtains references to collaborating objects. .     Questions : 2 What are the different types of IOC (dependency injection) ? Answers : 2 There are three types of dependency injection: ==>Constructor Injection...

Top servlets interview questions and answers

Questions : 1 What is Servlet? Answers : 1 Servlet is small program which execute on the server. The environment exploiting the functionalities of the web server. More     Questions : 2 What are advantages of servlets over CGI? Answers : 2 In CGI for every request there is a new process started which is quiet an overhead. In servlets JVM stays running and handles each request using a light weight thread. In CGI if there are 5000 request then 5000 CGI program is loaded in memory while in servlets there are 5000 thread and only one copy of the servlet class.     Questions : 3 What is Servlet life cycle? Answers : 3 There are three methods which are very important in servlet life cycle those one init(), service() and destroy(). Server invokes "init ()" method when servlet is first loaded in to the web server memory. Servlet reads HTTP data provided in HTTP request in the "service ()" method. Once initialized servlet remains in memory to process subsequent...

Top OOPs interview questions and answers

Questions : 1 What is Object Oriented Programming ? Answers : 1 It is a problem solving technique to develop software systems. It is a technique to think real world in terms of objects. Object maps the software model to real world concept. These objects have responsibilities and provide services to application or other objects.     Questions : 2 What is a Class ? Answers : 2 A class describes all the attributes of objects, as well as the methods that implement the behavior of member objects. It is a comprehensive data type which represents a blue print of objects. It’s a template of object.     Questions : 3 What is an Object ? Answers : 3 It is a basic unit of a system. An object is an entity that has attributes, behavior, and identity. Objects are members of a class. Attributes and behavior of an object are defined by the class definition.     Questions : 4 What is the relation between Classes and Objects? Answers : 4 They look very muc...

JSP interview questions and answers for freshers and experienced

Questions : 1 Can you explain What is JSP page life cycle? Answers : 1 When first time a JSP page is request necessary servlet code is generated and loaded in the servlet container. Now until the JSP page is not changed the compiled servlet code serves any request which comes from the browser. When you again change the JSP page the JSP engine again compiles a servlet code for the same. JSP page is first initialized by jspInit() method. This initializes the JSP in much the same way as servlets are initialized, when the first request is intercepted and just after translation. Every time a request comes to the JSP, the container generated _jspService() method is invoked, the request is processed, and response generated. When the JSP is destroyed by the server, the jspDestroy() method is called and this can be used for clean up purposes.     Questions : 2 What is EL ? Answers : 2 EL stands for expression language. An expression language makes it possible to easily acces...

Mysql interview questions and answers

Questions : 1 how to do login in mysql with unix shell Answers :1 By below method if password is pass and user name is root # [mysql dir]/bin/mysql -h hostname -u root -p pass     Questions : 2 how you will Create a database on the mysql server with unix shell Answers : 2 mysql> create database databasename;     Questions : 3 how to list or view all databases from the mysql server. Answers : 3 mysql> show databases;     Questions : 4 How Switch (select or use) to a database. Answers : 4 mysql> use databasename;     Questions : 5 How To see all the tables from a database of mysql server. Answers : 5 mysql> show tables;     Questions : 6 How to see table's field formats or description of table . Answers : 6 mysql> describe tablename;     Questions : 7 How to delete a database from mysql server. Answers : 7 mysql> drop database databasename;     Questions : 8 How we get Sum of co...