More than 3000 questions in repository. There are more than 900 unanswered questions. Click here and help us by providing the answer. Have a video suggestion. Click Correct / Improve and please let us know.
Ans. jQuery is a cross platform JavaScript library designed to simplify the client-side scripting of HTML. JQuery is the most popular JavaScript library.
Help us improve. Please let us know the company, where you were asked this question :
Q1053. Can we have try statement without catch? If try statement contains return will the finally block be executed? What happens if there is an exception inside finally block?
Q1057. There is a Table Student having Student Id, Name and Total Marks. Can you please write an SQL that will display the maximum marks obtained by a student ?
Q1060. Is it advisable to set the member variables through constructors instead of setting them through setters ?
Ans. Yes , If the values to be set are known at the time of initialization and doesn't involve polymorphic behavior.If it's using Dependency Injection , then Constructor injection must be available. If it suffice the above conditions, then definitely its advisable to have them set through constructor as they eagerly load the values into the memory and save it fro multiple values assignment ( one through default constructor and then through assignment )
Help us improve. Please let us know the company, where you were asked this question :
Q1061. What will happen if we have our own constructor but only initialize some of the member elements ?
Ans. Its always advisable to initialize all the member elements in case we don't use the compiler's default constructor as leftover member elements will have garbage values and may reflect and unstable state for the object.
Help us improve. Please let us know the company, where you were asked this question :
Ans. JRE or Java Runtime Environment is the Java Virtual Machine on which class files are executed. It includes borwser plugins that facilitates execution of class files in browsers.
JDK or Java Development Kit includes JRE , compiler and development tools.
Help us improve. Please let us know the company, where you were asked this question :
Q1064. Does Constructor returns the reference of the newly created object ?
Ans. No, New operator actually returns the reference of newly created object. Constructor's purpose is to initialize the default state of the object by setting the initial values of the elements and hence returns nothing.
Help us improve. Please let us know the company, where you were asked this question :
Q1065. Why doesn't Java even allow void return types for Constructors ?
Ans. Because having a void return type with the Constructor name will make it as a method name. As methods with the Class names are perfectly legit in Java, It needs some way to recognize the constructor and having none return type helps identify that.
Help us improve. Please let us know the company, where you were asked this question :
Ans. Web Service promotes looser coupling but with comes with coding and performance overheads. Jars provide better performance and may be lesser coding but are problematic with update distribution. If the situation doesn't require frequent dependency updates and if it's only read operation of persistence, Having dependencies should be a better choice , otherwise web service.
Help us improve. Please let us know the company, where you were asked this question :
Ans. DTO is Data Transfer Object i.e Pojo which is supposed to move between different layers of software architecture for transferring information. Example could be the object passed from client in case of web service call or the object passed to Persister for Database Persistence.
Help us improve. Please let us know the company, where you were asked this question :
Ans. DAO is Data Access Object which is used within Persistence Layer to make Database Transaction. For example , the class holding the Database connection and CRUD methods.
Help us improve. Please let us know the company, where you were asked this question :
Ans. POJO is Plain Java Object that holds only Member Elements , getters are setters and minimal processing on that. The primary purpose of such object is to either transfer information or keeping state for a while. They are not intended to provide any processing or transformation.
Help us improve. Please let us know the company, where you were asked this question :
Ans. Request Body in case of Get Request has no meaning and hence it's not parsed when the request is received. Alternatively Request Parameters are passed as either Path Params or Query Params.
Help us improve. Please let us know the company, where you were asked this question :
Ans. We creates separate branches for each project if development work is going on parallel and they are to be released at different times. Once the first release is done, we merge the branch changes into trunk. If they all have to go at one time, we usually would merge everything in the trunk itself.
Help us improve. Please let us know the company, where you were asked this question :
Q1079. Is it advisable to just hold checking in your changes to trunk if there is another release planned in between ?
Ans. If it's just smaller change, and single person is working, then this approach is fine. Otherwise there are risk on loosing it on your machine. Moreover , If there are multiple people working , it makes it hard to share code. It's better to create a separate branch and then merge it later to trunk.
Help us improve. Please let us know the company, where you were asked this question :