Search Interview Questions | 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. |
|
| ||||
Core Java - Interview Questions and Answers for 'Architecture' - 70 question(s) found - Order By Rating | ||||
| ||||
This question was recently asked at 'Microsoft'.This question is still unanswered. Can you please provide an answer. | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  design Asked in 1 Companies | ||||
| ||||
This question was recently asked at 'Oracle financial services'.This question is still unanswered. Can you please provide an answer. | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  project architecture Asked in 1 Companies | ||||
| ||||
Ans. WEB APP |WEB-INF - META-INF | | | META-INF.MF | lib - WEB.xml - Classes | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  web application Asked in 3 Companies intermediate   frequent | ||||
Library Management System has always been the favorite question. This questions is asked irrespective of level. | ||||
| ||||
Ans. Following could be the business sub domains or database schemas in such a system 1. Users / Members 2. Sourcing 3. Inventory Management 4. Operations Following services end points could be there 1. Users - addNewUser ( put ), removeUser ( post ) 2. Sourcing - addSupplier ( put ), removeSupplier ( post ) 3. Inventory Management - getInventory ( get ) 4. Operations - checkIn ( post ), checkout ( post ) There could be following Tables in Database 1. Users / Members - MEMBER, MEMBERSHIP_TYPE 2. Sourcing - SUPPLIER, SUPPLIER_PRODUCT, PRODUCT_REORDER_LEVELS 3. Inventory Management - INVENTORY,PRODUCTS 4. Operations - TRANSACTION | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  database  architecture  design Asked in 1 Companies | ||||
| ||||
This question was recently asked at 'Bloomberg'.This question is still unanswered. Can you please provide an answer. | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve   Asked in 1 Companies | ||||
| ||||
Ans. Suppose we want to visit a site for any information, information can be represented in different languages like English,German or may be other and their format for presentation can also differ from HTML to PDF or may be Plain text. In this case when an client makes an HTTP request to a server, client can also specify the media types here. Client can specify what it can accept back from host and on the basis of availability the host will return to the client. This is called content negotiation because client and server negotiated on the language and format of the content to be shared. | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  j2ee   internet   content negotiation   http   architecture | ||||
| ||||
Ans. An asynchronous event is one that occurs at an unpredictable time outside the control of the program that the CPU is running. It is not "synchronized" with the program. | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  j2ee   internet   web application   asynchronus   asynchronus communication   architecture Asked in 1 Companies | ||||
| ||||
Ans. Class , Heap , Stack , Register , Native Method Stack. | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  java   jvm   memory management   memory   advanced   architecture   technical architect Asked in 1 Companies intermediate   frequent | ||||
Try 5 Question(s) Test | ||||
| ||||
Ans. Yes by making entries in web.xml | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  j2ee   servlets   servelets   web application   java   web.xml   yes-no   architecture | ||||
| ||||
Ans. Spring enables developers to develop enterprise-class applications using POJOs. The benefit of using only POJOs is that you do not need an EJB container product. Spring is organized in a modular fashion. Even though the number of packages and classes are substantial, you have to worry only about ones you need and ignore the rest. Spring does not reinvent the wheel instead, it truly makes use of some of the existing technologies like several ORM frameworks, logging frameworks, JEE, Quartz and JDK timers, other view technologies. Testing an application written with Spring is simple because environment-dependent code is moved into this framework. Furthermore, by using JavaBean-style POJOs, it becomes easier to use dependency injection for injecting test data. Spring is web framework is a well-designed web MVC framework, which provides a great alternative to web frameworks such as Struts or other over engineered or less popular web frameworks. Spring provides a convenient API to translate technology-specific exceptions (thrown by JDBC, Hibernate, or JDO, for example) into consistent, unchecked exceptions. Lightweight IoC containers tend to be lightweight, especially when compared to EJB containers, for example. This is beneficial for developing and deploying applications on computers with limited memory and CPU resources. Spring provides a consistent transaction management interface that can scale down to a local transaction | ||||
Sample Code for spring | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  java   spring framework   mvc   spring container   architecture   technical architect   java architect   technical lead  ioc Asked in 2 Companies basic   frequent | ||||
| ||||
Ans. Java does not support pointers. Java does not support multiple inheritances. Java does not support destructors but rather adds a finalize() method. Finalize methods are invoked by the garbage collector prior to reclaiming the memory occupied by the object, which has the finalize() method. Java does not include structures or unions because the traditional data structures are implemented as an object oriented framework. C++ compiles to machine language , when Java compiles to byte code . In C++ the programmer needs to worry about freeing the allocated memory , where in Java the Garbage Collector takes care of the the unneeded / unused variables. Java is platform independent language but c++ is depends upon operating system. Java uses compiler and interpreter both and in c++ their is only compiler. C++ supports operator overloading whereas Java doesn't. Internet support is built-in Java but not in C++. However c++ has support for socket programming which can be used. Java does not support header file, include library files just like C++ .Java use import to include different Classes and methods. There is no goto statement in Java. There is no scope resolution operator :: in Java. It has . using which we can qualify classes with the namespace they came from. Java is pass by value whereas C++ is both pass by value and pass by reference. Java Enums are objects instead of int values in C++ C++ programs runs as native executable machine code for the target and hence more near to hardware whereas Java program runs in a virtual machine. C++ was designed mainly for systems programming, extending the C programming language whereas Java was created initially to support network computing. C++ allows low-level addressing of data. You can manipulate machine addresses to look at anything you want. Java access is controlled. C++ has several addressing operators . * & -> where Java has only one: the . We can create our own package in Java(set of classes) but not in c and c++. | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  java   c++   difference between java and c++   programming concepts   programming languages   architecture   technical architect   technical lead Asked in 1 Companies | ||||
| ||||
Ans. Struts 1 actions are singleton. So all threads operates on the single action object and hence makes it thread unsafe. Struts 2 actions are not singleton and a new action object copy is created each time a new action request is made and hence its thread safe. | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  java   j2ee   mvc frameworks   struts   struts1   struts2   struts 1   struts 2   architecture | ||||
Try 1 Question(s) Test | ||||
| ||||
Ans. sockets, RMI. EJB | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  java   distributed computing   rmi   ejb   sockets   socket   architecture | ||||
| ||||
Ans. Garbage Collector wont remove a strong reference. A soft reference will only get removed if memory is low. A weak reference will get removed on the next garbage collection cycle. A phantom reference will be finalized but the memory will not be reclaimed. Can be useful when you want to be notified that an object is about to be collected. | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  java   memory management   jvm   garbage collections   references   strong reference   soft reference   weak reference   phantom reference   architecture Asked in 2 Companies | ||||
| ||||
Ans. Swing provides both additional components like JTable, JTree etc and added functionality to AWT-replacement components. Swing components can change their appearance based on the current “look and feel†library that’s being used. Swing components follow the MVC paradigm, and thus can provide a much more flexible UI. Swing provides extras for components, such as icons on many components, decorative borders for components, tool tips for components etc. Swing components are lightweight than AWT. Swing provides built-in double buffering ,which means an off-screen buffer is used during drawing and then the resulting bits are copied onto the screen. Swing provides paint debugging support for when you build your own component. | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  java   awt   java ui   swing   difference between swing and awt   architecture | ||||
| ||||
Ans. JProbe, OptimizeIt | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  java   tools   jvm   memory management   memory leaks   jprobe   optimeit   architecture   technical lead | ||||
| ||||
Ans. A DOM (Document Object Model) parser creates a tree structure in memory from an input document whereas A SAX (Simple API for XML) parser does not create any internal structure. A SAX parser serves the client application always only with pieces of the document at any given time whereas A DOM parser always serves the client application with the entire document no matter how much is actually needed by the client. A SAX parser, however, is much more space efficient in case of a big input document whereas DOM parser is rich in functionality. Use a DOM Parser if you need to refer to different document areas before giving back the information. Use SAX is you just need unrelated nuclear information from different areas. Xerces, Crimson are SAX Parsers whereas XercesDOM, SunDOM, OracleDOM are DOM parsers. | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  java   xml   parsers   sax   dom parser   difference   architecture   technical lead   technical architect  markup language   sax vs dom Asked in 14 Companies   frequent | ||||
Try 1 Question(s) Test | ||||
| ||||
Ans. DTD or Document Type Definition is a standard agreed upon way of communication between two parties. Your application can use a standard DTD to verify that data that you receive from the outside world is valid and can be parsed by your parser. | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  xml   markup language   dtd   document type definition   architecture | ||||
| ||||
Ans. XSD or Xml Schema Definition is an extension of DTD. XSD is more powerful and extensible than DTD | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  java   xml   markup language   xsd   dtd   architecture | ||||
| ||||
Ans. Its the process of creating Java Objects out of XML structures. | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  xml   java api for xml   unmarshalling   parser   sax   dom   architecture Asked in 1 Companies | ||||
| ||||
Ans. LDAP servers are typically used in J2EE applications to authenticate and authorise users. LDAP servers are hierarchical and are optimized for read access, so likely to be faster than database in providing read access. | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  java   j2ee   ldap   servers   authentication   authorization   architecture   technical lead   technical architect  production support Asked in 1 Companies | ||||
Recently asked in TCS , Tech Mahindra, HCL , Accenture and Fidelity. | ||||
| ||||
Ans. The DispatcherServlet configured in web.xml file receives the request. The DispatcherServlet finds the appropriate Controller with the help of HandlerMapping and then invokes associated Controller. Then the Controller executes the logic business logic and then returns ModeAndView object to the DispatcherServlet. The DispatcherServlet determines the view from the ModelAndView object. Then the DispatcherServlet passes the model object to the View. The View is rendered and the Dispatcher Servlet sends the output to the Servlet container. Finally Servlet Container sends the result back to the user. | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  j2ee   spring   mvc   frameworks   web applications   architecture Asked in 11 Companies Basic   frequent | ||||
| ||||
Ans. servlet is a small, server-resident program that typically runs automatically in response to user input. A network socket is an endpoint of an inter-process communication flow across a computer network. We can think of it as a difference between door and gate. They are similar as they both are entry points but they are different as they are put up at different areas. Sockets are for low-level network communication whereas Servlets are for implementing websites and web services | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  java   j2ee   networking   servlet   socket   difference between.java.net   technologies   architecture | ||||
| ||||
Ans. In GUI programming, an object that can be registered to be notified when events of some given type occur. The object is said to listener? for the events. | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  java   gui   ui programming   swing   awt   swt   listener   architecture | ||||
| ||||
Ans. A way of encoding characters as binary numbers. The Unicode character set includes characters used in many languages, not just English. Unicode is the character set that is used internally by Java. | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  java   character encoding   unicode   architecture | ||||
| ||||
Ans. The memory pool containing all the reflective data of the java virtual machine itself, such as class and method objects. With Java VMs that use class data sharing, this generation is divided into read-only and read-write areas. The Permanent generation contains metadata required by the JVM to describe the classes and methods used in the application. The permanent generation is populated by the JVM at runtime based on classes in use by the application. In addition, Java SE library classes and methods may be stored here. | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  java   jvm   memory management   permgen   permanent generation   advanced   architecture Asked in 9 Companies expert | ||||
| ||||
Ans. The Permanent Generation (PermGen) space has completely been removed and is kind of replaced by a new space called Metaspace. The consequences of the PermGen removal is that obviously the PermSize and MaxPermSize JVM arguments are ignored and you will never get a java.lang.OutOfMemoryError: PermGen error. | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  java   jvm   memory management   permgen   permanent generation   metaspace   advanced   architecture expert | ||||
| ||||
Ans. Session tracking is a mechanism that servlets use to maintain state about a series requests from the same user across some period of time. The methods used for session tracking are: User Authentication - occurs when a web server restricts access to some of its resources to only those clients that log in using a recognized username and password Hidden form fields - fields are added to an HTML form that are not displayed in the client's browser. When the form containing the fields is submitted, the fields are sent back to the server URL rewriting - every URL that the user clicks on is dynamically modified or rewritten to include extra information. The extra information can be in the form of extra path information, added parameters or some custom, server-specific URL change. Cookies - a bit of information that is sent by a web server to a browser and which can later be read back from that browser. HttpSession- places a limit on the number of sessions that can exist in memory. | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  j2ee   servlets   session   session management   web applications   cookies   httpsession   url rewriting   architecture Asked in 1 Companies | ||||
| ||||
Ans. It's a technique to allow multiple clients to make use of a cached set of shared and reusable connection objects providing access to a database or other resource. | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  java   jdbc   db connectivity   connection pooling   architecture Asked in 3 Companies basic   frequent | ||||
Advanced level question usually asked to senior developers , leads and architects. | ||||
| ||||
Ans. Volatile is an instruction that the variables can be accessed by multiple threads and hence shouldn't be cached. As volatile variables are never cached and hence their retrieval cannot be optimized. | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  java   java keywords   volatile   synchronization   compiler optimization   variable caching   architecture Asked in 3 Companies expert | ||||