Interview Questions and Answers for 'Tata Consultancy (TCS)' - 77 question(s) found - Order By Newest Frequently asked to fresh graduates and less experienced developers. Among the first few questions in many interviews. Q1. What are the difference between composition and inheritance in Java? Core Java Admin info@buggybread.com
Ans. Composition - has-a relationship between objects.
Inheritance - is-a relationship between classes.
Composition - Composing object holds a reference to composed objects and hence relationship is loosely bound.
Inheritance - Derived object carries the base class definition in itself and hence its tightly bound.
Composition - Used in Dependency Injection
Inheritance - Used in Runtime Polymorphism
Composition - Single class objects can be composed within multiple classes.
Inheritance - Single class can only inherit 1 Class.
Composition - Its the relationship between objects.
Inheritance - Its the relationship between classes. Sample Code for inheritance Sample Code for composition Help us improve. Please let us know the company, where you were asked this question : VIDEO Like Discuss Correct / Improve java java concepts inheritance object oriented programming (oops) oops concepts composition object oriented programming (oops) oops concepts inheritance object oriented programming (oops) oops concepts vs composition object oriented programming (oops) oops concepts HCL Technologies Tata Consultancy (TCS) Infosys Amazon Source Intelligence News UK Starmount MapQuest SalesForce Expedia Deegit JP Morgan Canva Todle Yodle Berkley Net Help Scout Partners HealthCare Doximity Commvault Heroku Starmount Help.com healthcare system TU Kaiserslautern Epam basic   frequent Try 5 Question(s) Test Q2. Which are the different segments of memory ? Core Java Anonymous
Ans. 1. Stack Segment - Contains primitives, Class / Interface names and references.
2. Heap Segment - Contains all created objects in runtime, objects only plus their object attributes (instance variables), Static variables are also stored in heap.
3. Code Segment - The segment where the actual compiled Java bytecodes resides when loaded Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve java memory memory management stack memory heap memory code segment memory advanced NX Developer Velocity Commvault eBizprise Taiwan Tata Consultancy (TCS) Nakisa HCL Technologies Blue Coat Symantec expert   frequent Try 6 Question(s) TestVery frequently asked to Fresh graduates. Q3. What is the difference between Encapsulation and Abstraction? Core Java Anonymous
Ans. 1.Abstraction solves the problem at design level while encapsulation solves the problem at implementation level
2.Abstraction is used for hiding the unwanted data and giving relevant data. while Encapsulation means hiding the code and data into a single unit to protect the data from outside world.
3. Abstraction lets you focus on what the object does instead of how it does it while Encapsulation means hiding the internal details or mechanics of how an object does something.
4.For example: Outer Look of a Television, like it has a display screen and channel buttons to change channel it explains Abstraction but Inner Implementation detail of a Television how CRT and Display Screen are connect with each other using different circuits , it explains Encapsulation. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve java oops oops concepts encapsulation object oriented programming (oops) oops concepts abstraction basic interview question Synechron Amazon HCL Technologies Tata Consultancy (TCS) Wipro Infosys Technologies 3DPLM Software Solutions Ojas Innovative Technologies John Deere Mastek basic   frequent Try 2 Question(s) TestVery frequently asked. Favorite question in Walk in Drive of many Indian service companies. Frequently asked in HCL Technologies, TCS and Accenture. Q4. What is the difference between final, finally and finalize() ? Core Java Admin info@buggybread.com
Ans. final - constant variable, objects cannot be de-referenced, restricting method overriding, restricting class sub classing.
finally - handles exception. The finally block is optional and provides a mechanism to clean up regardless of what happens within the try block. Use the finally block to close files or to release other system resources like database connections, statements etc.
finalize() - method helps in garbage collection. A method that is invoked before an object is discarded by the garbage collector, allowing it to clean up its state. Sample Code for final Sample Code for finally Sample Code for finalize Help us improve. Please let us know the company, where you were asked this question : VIDEO Like Discuss Correct / Improve java oops final finally finalize Thomson Reuters WITS Antra Jive MorningStar VanGuard Alcatel Lucent Morningstar A9.com EPAM Nuance SirsiDynix NCR VanGuard Proofpoint Interview Disney Orbitz Worldwide GFI Informatique Canon WITS Simba Technologies Marlabs American Well Global Relay L&T Infotech HCL Technologies Tata Consultancy (TCS) Wipro Infosys Accenture Accenture India Jive Salesforce Deegit NTT DATA Proofpoint Morningstar Bank Of America Manhattan Associates Optum NorthPoint Nok Nok Labs Simba Technologies
Rhino Africa Solutionreach V Soft Consulting EBay Cognizant (CTS) IBM ExactTargetKewill CV Holdings Symphony Cubic Web solutions Star International FatWire Mindteck Dark Horse TrueCaller marlabs Proofpoint basic   frequent Try 4 Question(s) TestFrequently asked question in companies using Hibernate. Q5. What is Lazy Initialization in Hibernate ? Hibernate Admin info@buggybread.com
Ans. It's a feature to lazily initialize dependencies , relationship and associations from the Database. Any related references marked as @OneToMany or @ManyToMany are loaded lazily i.e when they are accessed and not when the parent is loaded. Sample Code for Lazy Initialization Help us improve. Please let us know the company, where you were asked this question : VIDEO Like Discuss Correct / Improve hibernate lazy loading hibernate lazy initialization hibernate architecture overstock.com BridgePoint Technologies Medgate Dex Media Diversant Tieto Oracle Bank of America Merrill LYNCH NEC Japan HCL Technologies Deloitte Accenture Accenture India Infosys Tata Consultancy (TCS) Luxoft Nvidia Cority Kumaran Systems PubMatic Deven Infotech Tavant Casenet Azuga Egen Solutions Photon Infotech Dun & Bradstreet ITHAKA EngineerBabu Atos Zycus CPA Global Zycus Fareportal Saxo Bank NSF International Publicis Sapient Razorfish Pratham Software ATCS Q3 Technologies Metacube Software A3Logics Nagarro Tech Mahindra Patni Computers L&T Infotech Mphasis Mindtree Hexaware Collabera 3i Infotech IGate Kpit Technologies NIIT Technologies Trianz Persistent Systems IT Asset SkillTeam Consulting KenQA Services Career Infosystem Savera IT Solutions Miracle Corporate Solutions MAKWIZ Technologies Global Resources Consulting Nastech Consulting Best Infosystems InnoData India Career Trackers and Consulting BR Raysoft Global Brainwork TechnoSolutions GroupFit Insurance Brokers FlexSin Technologies IRIS Software FIS Global Business Solutions TRH Consultancy Services NexThoughts Software Technologies Basic   frequent Try 2 Question(s) TestRecently asked in TCS , Tech Mahindra, HCL , Accenture and Fidelity. Q6. Explain Flow of Spring MVC ? Spring Admin info@buggybread.com
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 Accenture Accenture India fidelity IBM India Softtek Tata Consultancy (TCS) HCL Technologies Pragiti Internet Technologies Cognizant (CTS) Tech Mahindra Basic   frequent Q7. What is a String Pool ? Core Java Anonymous
Ans. String pool (String intern pool) is a special storage area in Java heap. When a string is created and if the string already exists in the pool, the reference of the existing string will be returned, instead of creating a new object and returning its reference. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve java oops string string class string pool heap memory SAS Institute Ariba GuideWire Harbinger Oracle Virtusa Knoa Polaris GuideWire HCL Technologies Tata Consultancy (TCS) Infosys Technologent MphasiS Harbinger Group Kony Evergent NTT Data VMware Markit Ariba Tech Mahindra Bureau Veritas InfoStretch PTC Software Mindtree Centre for Internet and Society (CIS) Trimax IT Infrastructure & Services City National Bank (CNB) intermediate   frequent Try 2 Question(s) TestBasic and Very Frequently asked. Q8. What is Polymorphism in Java ? Core Java 2016-11-06 09:10:54
Ans. Polymorphism means the condition of occurring in several different forms.
Polymorphism in Java is achieved in two manners
1. Static polymorphism is the polymorphic resolution identified at compile time and is achieved through function overloading whereas
2. Dynamic polymorphism is the polymorphic resolution identified at runtime and is achieved through method overriding. Sample Code for overloading Sample Code for overriding Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve polymorphism object oriented programming (oops) oops concepts oops concepts Credit Suisse Unbounded Solutions Microsoft Google Purch HCL Technologies Tata Consultancy (TCS) Wipro Mathworks Accenture Accenture India ZonOff ZapCom Addteq Priceline.com Acute Informatics Trimax IT Infrastructure & Services USAA HCL Technologies FDM Group AppEnsure Inov8 TIAA Revature Lockheed Martin ScotiaBank Algorhythm Tech Aurus Xpanxion Bitwise Pune GS Labs Bitwise India CRIF Saggezza Synchrony Micro Focus Mindtree Zycus Capgemini ZapCom Group Infosys Technologies SLK Group Intuit Bangalore Quickr Comviva Technology Altimetrik IDEALINVENT Technologies Kewill coMakeIT Vekomy Technologies Eze Software State Farm Rolta State Street High Radius Cerner TIBCO 3i Infotech Goldman Sachs ITC abhra InteractCRM Polaris Naggaro Siemens Hexaware Technologies Skillnet solutions Logixal Solutions Mumbai Naaptol Mumbai Logixal Solutions NSETECH Mastek Mumbai AppAmplify Noida HexaView Technologies Wipro Wittybrains Software Technologies Meenakshi Noida Eastern Software Systems Noida MediaAgility Gurgaon Daffodil Software Oracle Gurgaon Kellton Tech Gurgaon Bharti Airtel Gurgaon IHS Markit Gurgaon Sinew Gurgaon Grappus Gurgaon Erricson Gurgaon Deloitte Accenture Accenture India Tech Mahindra Patni Computers L&T Infotech Mphasis Mindtree Hexaware Collabera 3i Infotech IGate Kpit Technologies NIIT Technologies Trianz Persistent Systems IT Asset FIA-US VanGuard General Atomics Basic   frequent Try 2 Question(s) Test Q9. Explain OOPs
or
Explain OOPs Principles
or
Explain OOPs Concepts
or
Explain OOPs features
or
Tell me something about OOPs Core Java 2017-06-13 08:25:45
Ans. OOPs or Object Oriented Programming is a Programming model which is organized around Objects instead of processes. Instead of a process calling series of processes, this model stresses on communication between objects. Objects that all self sustained, provide security by encapsulating it's members and providing abstracted interfaces over the functions it performs. OOP's facilitate the following features
1. Inheritance for Code Reuse
2. Abstraction for modularity, maintenance and agility
3. Encapsulation for security and protected
4. Polymorphism for flexibility and interfacing Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve oops oops features Trimax IT Infrastructure & Services Aricent HCL Technologies Tata Consultancy (TCS) Infosys Cognizant (CTS) Capgemini Blue Coat Symantec Deegit Cerner Verizon Ancestry Accenture Accenture India Lexis Nexis Elsevier Overstock Sofi DeCurtis Appirio GlobalLogic Robert Bosch Lexicon IT Teleperformance Ranosys Technologies InfoObjects LoginRadius Pixere GirnarSoft In Time Tec Konstant Infosolutions Axtria Infostretch TatavaSoft E2logyCroods Consolidates Elegant MicroWeb IndiaNIC Infotech Surekha Technologies Amnex InfoTechnologies Wishtree Technologies Apttus Majesco Techsosys Virtusa Gruppo Banca Sella eNoah Volante Technologies Karomi Urjanet Full Creative Uniphore Software Systems Revature Saggezza DXC Technology QBurst Kott Software Petrolink Services RapidValue Solutions Speridian Technologies Fingent Marlabs Ixigo.com Bravura Solutions Amdocs GSPANN Technologies Healthkart Hughes Systique Prospecta Fidelity Mediology Software Ksolves InfoGain Mindfire Solutions Hays R Systems Netrix Technology HexaView PayTM Suncore Microsystem Remaxys ANR Software Impetus Technologies WittyBrains InnovationM Diction Technology Bhavna Corp Bristlecone Fiserv Quovantis Technologies InnovationM Intelligrape Software PayCraft Nearbuy WSE Group Grappus MAQ Software JellyFish Technologies SysArc Infomatix MetricStream Delhivery Atidan Experis NICE Dark Horse IT VizExperts CatalystOne Syntel BlackNGreen InnoEye Technologies Java R&D QA InfoTech HARMAN Eli Global Damco Solutions LensKart 360 Degree FlipKart Egen Solutions AppzCloud Technologies TechAhead Yamaha Motor Solutions Quovantis Technologies Adobe Samsung Noida Lab Lybrate Novelvox HSBC Holdings Fluid AI Nelito System GoldenSource Naaptol Ashtech Infotech Mobicule Future Group Calypso Technology Skillnet Solutions 3i Infotech Nucsoft InteractCRM Aurionpro Solutions Hexaware Technologies Ness Technologies Cigniti Inc ValueLabs Magnaquest Mphasis IVY Comptech Medlife.com ServiceNow Acclaris Reliance Jio Infocomm Bentley Systems Erricson Worldwide Hyland Xpanxion Cerner Codeclouds IT Solutions Procentris Cleocotech International Divergent Soft Lab Endevor IT Solution Impetus Infotech India Bhaskar Technologies SeroSoft Solutions Retina Software General Atomics B3 - Brain Behind Brand Oni Enterprises Amal Infosystems Future Focus Infotech Celcom Technologies Globez Professional Solutions Harjai Computers Pazzo Solutions Data-Core Systems Sampoorna Computer People Trowano Avenues ezyreach.in Sandeep Dwellers Interra Information Technologies Sellcraft Global Solutions RJS Tech Solutions WSE Group Magna India Educiting Technologies Continental Automotive Components India IBM India Asap Info Systems Capgemini Smart Move Career Consultants Aeronube Technologies Skywings Advisors Diverse Lynx ProCreations Kolkata Tickto Solutions Fresher Jobs SMVA Consultants Ixoraa Enterprises ILabz Technology 2Coms Consulting Talent Flix Nat IT Solved Kopal Consultants LLP Rebaca Technologies Techs To Suit Inc Soffront Software eDot Health Solutions MSH Talent Solutions Techathon Networks LLP Vara United Crossover for work Wedoria Technologies Golden Opportunities Minivet System Maitretech JS Tech Alliance BirjaSoft Technologies BirlaSoft AwzPact Technologies and Services MaxGen Technologies Manker Consultancy Services I Quest Consultants ACE Group Seven Consultancy WTM It Limited P R Software DezVen Software Solution Aliens Group EXL Tech Solutions AcompWorld Technosoft Eulogik xtranet technologies Java RnD basic   frequent Do you think these are the Best Java Frameworks ? OpenXava SPRING MVC Apache Stripes Check everything that is Best in Java Click Here
Very frequently asked. Favorite question in Walk in Drive of many Indian service companies. Q10. Difference between TreeMap and HashMap ? Core Java Anonymous
Ans. They are different the way their elements are stored in memory. TreeMap stores the Keys in order whereas HashMap stores the key value pairs randomly. Sample Code for treemap Sample Code for hashmap Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve java collections map treemap hashmap Amber Road CTS (Cognizant) ION Trading DataMetica Accenture Accenture India The Advisory Board Company BidGely Infosys Tata Consultancy (TCS) HCL Technologies Wipro Booking.com MakeMyTrip Garena Online Garmin ION Trading Accuity Palantir Technologies Books International Wealthfront Marin Software Garmin IBM Global Logic Fiserv Cumulus Systems CCTS UST Global Cumulus Systems Apcolite basic   frequent Try 1 Question(s) TestVery frequently asked across all types of companies. Q11. Difference between HashMap and Hashtable? Core Java Anonymous
Ans. Hashtable is synchronized whereas HashMap is not.HashMap allows null values whereas Hashtable doesnt allow null values. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve java collections hashmap map hashtable basic interview question ebay tcs hcl technologies infosys technologies Morgan Stanley Yahoo Q3 Technologies PriceLine Solution Rally Coupang HCL Technologies Tata Consultancy (TCS) Infosys Technologies Accenture Accenture India JPMorgan Chase Priceline.com basic   frequent Try 2 Question(s) TestVery Frequently asked. Have been asked in HCL Technologies very frequently ( based on 3 feedback ). Among first few questions in many interviews. Q12. Differences between abstract class and interface ? Core Java Admin info@buggybread.com
Ans. Abstract classes can have both abstract methods ( method declarations ) as well as concrete methods ( inherited to the derived classes ) whereas Interfaces can only have abstract methods ( method declarations ).
A class can extend single abstract class whereas it can implement multiple interfaces. Help us improve. Please let us know the company, where you were asked this question : VIDEO Like Discuss Correct / Improve java classes abstract class interfaces GlobalLogic HCL Technologies Tata Consultancy (TCS) Infosys Wipro Mindtree CapitalOne Accenture Accenture India IBM India Infoview Technologies Salesforce AT&T United Health Group (UHG) Verilogue Amazon Expeditors Syntel SalesForce Cornerstone OnDemand Expedia OLA NSF International Copper Mobile Think Future Technologies MorphoTrust Global Healthcare Prodigious Internet Brands SciQuest arvato Systems iCIMS Ideas2IT virtusa polaris Vitech Systems Cognizant (CTS) Speridian Technologies Ojas Innovative Technologies SWC Technology Partners Cricbuzz Jean Martin Capgemini Virtusa ECI Telecom Aptify Crossover ample softech Metanoia software solutions Overstock.com Unic Sol India Experis India Intellect Design Arena Sarathi Softech Transorg Analytics Cibersites India Resource Weaver Indium Software Kone Elevator Merkur Gaming Prama Hikvision Gurucul Solutions e-Zest Solutions ReadMind Info Services Equator Business Solutions basic   frequent Very Frequently asked across all type of companies and across all levels. Q13. Difference between Public, Private, Default and Protected ? Core Java Anonymous
Ans. Private - Not accessible outside object scope.
Public - Accessible from anywhere.
Default - Accessible from anywhere within same package.
Protected - Accessible from object and the sub class objects. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve java oop access specifier public private default protected basic interview question HCL Technologies Tata Consultancy (TCS) IBM Wipro Deegit Argonne National Laboratory Motorola Mobility Accenture Accenture India Deegit Cerner basic   frequent Try 1 Question(s) TestVery frequently asked. Favorite question in Walk in Drive of many Indian service companies. Q14. What is a final method ? Core Java Anonymous
Ans. Its a method which cannot be overridden. Compiler throws an error if we try to override a method which has been declared final in the parent class. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve java oops final final method Oracle Intertek HCL Technologies Tata Consultancy (TCS) Accenture Accenture India IBM Goldman Sachs TrueCar Intertek RedMane Antra Flanders Software Causecode Technologies ING Direct Intertek Tudip Technologies Finance One Mphasis #i Infotech L&T Infotech Tata Elxsi State Farm Cerner Deegit Infosys Technologies Wipro Mahindra Satyam Global Logic InfoGain Cognizant (CTS) basic   frequent Try 1 Question(s) TestAns. There are two types of casting, casting between primitive numeric types and casting between object references. Casting between numeric types is used to convert larger values, such as double values, to smaller values, such as byte values. Casting between object references is used to refer to an object by a compatible class, interface, or array type reference Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve java data types casting type casting basic interview question Mindtree HCL Technologies Wipro Tata Consultancy (TCS) Infosys KPMG Accenture Accenture India basic   frequent Very Frequently asked to fresh graduates and less experienced. Favorite question in Walk in drives. Frequently asked in Indian Services companies. Q16. Difference between Overloading and Overriding ? Core Java Anonymous
Ans. Overloading - Similar Signature but different definition , like function overloading.
Overriding - Overriding the Definition of base class in the derived class. Sample Code for overloading Sample Code for overriding Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve java oops overloading overriding oops concepts basic interview question PC Technology Cognizant (CTS) Donlen hybris Software RedMane Allerin Technologies Gemalto Allerin Technologies HCL Technologies Tata Consultancy (TCS) Accenture Accenture India Infosys Technologies Polaris United Healthcare India IBM India Xchanging American Express Antra Flipp Computer Sciences Corporation (CSC) Garmin NetSuite Donlen Hudsons Bay Techlogix SevOne Synactive Oodles Technologies FDM Group Marlabs RedMane Technology Faichi Solutions TD Tech Mahindra Shutterfly Luxoft PC Technology CCC Information Services State Farm Raja Software Mastek EPAM Morgan Stanley SummitWorks Sony Citibank Emtec LowerMyBills Consilience Xavor AllState FasTrak AmTrust Financial Walt Disney Ultramain Systems International Turnkey Systems Knoldus Software CA Technologies Amdocs FDM Group Hybris Fidelity United Health Group (UHG) Bluewhale Solutions Pegasystems Revature
Innoplexus Vanguard AptSource Perficient Grapecity Subex QuintilesIMS NimbleUser Expeditors Associate Sapient HR Cloud Summitworks Jabong.com Kony Labs Price Waterhouse Coopers (PWC) basic   frequent Try 1 Question(s) Test Q17. Difference between SAX and DOM Parser ? Xml Admin info@buggybread.com
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 First Advantage Wellington Management Chase Reference Data Distribution System Soft Technologies TD Bank Canada JPMorgan Chase Tata Consultancy (TCS) PayPal Citibank Free Doctor Helpline Wells Fargo Huawei Technologies HealthFirst American Express   frequent Try 1 Question(s) TestAlmost sure to be asked in every company using any Dependency Injection framework ( Spring, Guice etc ) Q18. What is Dependency Injection or IOC ( Inversion of Control ) ? Design
Ans. It is a Design Pattern that facilitates loose coupling by sending the dependency information ( object references of dependent object ) while building the state of the object. Objects are designed in a manner where they receive instances of the objects from other pieces of code, instead of constructing them internally and hence provide better flexibility. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve design patterns ioc ( Inversion of Control ) dependency injection Nucleus Software Exports HCL Technologies Tata Consultancy (TCS) HCL Infosys Cognizant (CTS) Barclays General Electric Infosys Technologies Elsevier Sabre ZapCom Nike Sogeti CSG International Lowes DWS Mitsui Bussan Logistics Payment Processing Partners Liquidnet AmTrust Financial VectorForm Cybage Vanderbilt University Cigniti Accenture Accenture India Ball Aerospace GE Healthcare 1-800 Contacts VinSolutions Arrow Electronics Monitise Avenue Code Thetus Corporation Shodogg Levi9 BuildLinks Suyati Technologies Kanerika Software Alliance Inspection Management Promega Victorious Zoll Data Systems Parkmobile PerceptiMed Crate and Barrel Carbonite Concur Codazen GlobalLogic AccuSoft Attinad Tillster AppRiver TrustPilot Pearson Kony Art Technology Group VeriSign Accion Labs IGS Energy National Bankruptcy Services RealPage Green Dot Indecomm Global bebo Technologies Open Solutions Xoriant NCR Macmillan Cancer Support NetSuite Asynchrony Labs DealDash Vizio Fiserv Federal Reserve Bank of Minneapolis Tinder FICO Trustwave intermediate   frequent Q19. What are the different types of inner classes ? Core Java Anonymous
Ans. Simple Inner Class,
Local Inner Class,
Anonymous Inner Class,
Static Nested Inner Class. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve java inner classes classes Infosys Tata Consultancy (TCS) HCL Technologies IBM IBM India Gateway Media basic   frequent Try 1 Question(s) TestDo you think these are the Best Java Frameworks ? OpenXava SPRING MVC Apache Stripes Check everything that is Best in Java Click Here
Very frequently asked. Favorite question in Walk in Drive of many Indian service companies. Q20. What is a Final Variable ? Core Java Anonymous
Ans. Final variable is a variable constant that cannot be changed after initialization. Sample Code for final variable Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve oops java final final variable basic interview question IBM Goldman Sachs TrueCar Intertek RedMane Antra HCL Technologies Tata Consultancy (TCS) Accenture Accenture India Forte Group Mastercard basic   frequent Try 1 Question(s) TestVery frequently asked in phone and walk in interviews. Q21. What are Marker Interfaces ? Name few Java marker interfaces ? Core Java Anonymous
Ans. These are the interfaces which have no declared methods.Serializable and cloneable are marker interfaces. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve java oops interfaces marker interface serializable clonable Qualtech Consultants Computer Sciences Corporation (CSC) Addteq Infosys Synechron Amdocs JPMorgan Chase Qualtech Consultants Velopsys HCL Technologies Tata Consultancy (TCS) Accenture Accenture India Erricson Technologies Amdocs Ericsson Oracle Avaya Copart Innoplexus Volvo Information Technology intermediate   frequent Try 1 Question(s) TestFrequently asked to fresh graduates. Ans. When two threads are waiting each other and cant precede the program is said to be deadlock. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve java threads multi threading operating system deadlock concurrency Lime Wire Perfect Sense QuantCast Aequitas NEO Exchange Akuna Capital Juniper Networks Casale Media Netflix NetApp Apple AIG Cpart SnapStream Media Cumulus Systems Wissen Infotech HedgeServ Corp KeyIdeas Infotech Verint Systems BlackBerry EverQuote HCL Technologies Tata Consultancy (TCS) Symantec basic   frequent Very frequently asked.Usually among first few questions. Q23. What is MVC ? Design Anonymous
Ans. MVC is a Design Pattern that facilititates loose coupling by segregating responsibilities in a Web application
1. Controller receives the requests and handles overall control of the request
2. Model holds majority of the Business logic, and
3. View comprise of the view objects and GUI component Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve j2ee mvc mvc design pattern design pattern struts spring web application web frameworks ebay HCL Technologies Tata Consultancy (TCS) Wipro United Health Group (UHG) Accenture Accenture India Fidelity Fidelity Investments
Tieto Walt Disney Sharon Software Systems Tech Mahindra Amdocs Deegit Lexis Nexis Elsevier Symantec Infosys Priceline Ancestry Cumulus Systems Capgemini Symantec Motorola Solutions Priceline Overstock Ancestry Vitech Systems Group Wells Fargo PayloCity ITHAKA MIT Chewy Deutsche Bank Bureau Veritas HARMAN Marlabs Mindtree Jefferies Solstice Cogent Infotech Cybage Software Uneecops Technologies Sky Betting & Gaming Conduent Aricent DataMetica Winsoft Technologies Altimetrik.Harbinger Group Bombayworks Software Solutions LiveVox Quickwork Technologies Codoc Technologies Provizor It Services Fulcrum Worldwide Thermo Fisher Scientific CME Group New Era India Consultancy Live Connections Simeio basic   frequent Try 1 Question(s) Test Q24. What is Generalization and Specialization in terms of casting ? Core Java Admin info@buggybread.com
Ans. Generalization or UpCasting is a phenomenon where a sub class is prompted to a super class, and hence becomes more general. Generalization needs widening or up-casting. Specialization or DownCasting is a phenomenon where a super class is narrowed down to a sub class. Specialization needs narrowing or down-casting. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve java data types casting type casting up casting type casting downcasting type casting generalization specialization Tata Consultancy (TCS) VirtusaPolaris Very frequently asked in companies using SOA. Q25. What are RESTful Web Services ? Rest Admin info@buggybread.com
Ans. REST or Representational State Transfer is a flexible architecture style for creating web services that recommends the following guidelines -
1. http for client server communication,
2. XML / JSON as formatiing language ,
3. Simple URI as address for the services and,
4. stateless communication. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve java web services rest java j2ee architecture Synechron CapitalOne Overstock.com Ebay At&t HCL Technologies Barclays Tata Consultancy (TCS) Cognizant (CTS) Wipro Infosys EPAM Mphasis verchaska infotech intermediate   frequent Q26. What are the contents of Hibernate configuration file ( hibernate.cfg.xml ) ? Hibernate Admin info@buggybread.com
Ans. HBM Files ( Mapping )
DB Connection ( DB Connection String , User Name , Password , Pool Size )
SQL Dialect ( SQL variant to be generated )
Show SQL ( Show / No show SQL on Console )
Auto Commit ( True / False ) Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve hibernate configuration barclays Mphasis Mccoy Global Links Availity Infosys GlobalLogic Cognizant (CTS) Overstock.com Erricson Erricson India HCL Technologies Tata Consultancy (TCS) Frequently asked to fresh graduates. Q27. What is ACID ? Database 2016-11-04 08:09:44
Ans. ACID stands for Atomicity, Consistency, Isolation, Durability is a set of properties of database transactions.
Atomicity means all or nothing. i.e parts of a transaction shouldn't commit if any one of them fails. Either the whole transaction should succeed or it should be complete rollback.
Consistency means that any transaction should lead database from one stabe state to another.
Isolation means that the execution of transaction results in a system state that would be obtained if transactions were executed serially.
Durability means that when a transaction is committed it forms the permanent state of database. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve database acid CapitalOne Tata Consultancy (TCS) SilverRail Technologies A9.com Oracle Sirius Computer Solutions Intermediate Try 1 Question(s) Test Q28. If an Abstract class has only abstract methods, What's the difference between such a class and an interface ? Core Java 2017-05-07 07:26:29
Ans. Such a class still can have member elements which can be inherited and hence facilitate code reuse. Moreover Abstract class can have non final static elements whereas interfaces are only allowed to have static final elements. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve abstract class interfaces Tata Consultancy (TCS) Infosys Basic Q29. What is the use of Transient Keyword ? Core Java Anonymous
Ans. It in Java is used to indicate that a field should not be serialized. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve java oops serialization transient java keywords Cognizant (CTS) The Advisory Board Company HCL Technologies Tata Consultancy (TCS) Accenture Accenture India Mphasis L&T Infotech Patni SecurView Morgan Stanley American Express Natrix Technology Intellect Design Arena Calypso Technology Deloitte CRIF eQ Technologic SQLI J-Labs U.S. Bank US Bank Next Insurance Personal Capital Global Healthcare Exchange Mastek Toshiba Zilingo Tivo OnDot Systems Infinera NXP Semiconductors Walmart Specbee Autosar Finoit TechnoGen Samsung India intermediate   frequent Try 2 Question(s) TestDo you think these are the Best Java Frameworks ? OpenXava SPRING MVC Apache Stripes Check everything that is Best in Java Click Here
Very Frequently asked.Favorite question in Walk in drive for many Indian service companies. Q30. What is a Final Class ? Anonymous
Ans. A Class that cannot be sub classed. Sample Code for final class Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve java oops final final class java keyword basic interview question HCL Technologies Tata Consultancy (TCS) Infosys basic   frequent Very Frequently asked. Usually asked along with String Class related questions. Q31. What is an immutable class ? Core Java Anonymous
Ans. Class using which only immutable (objects that cannot be changed after initialization) objects can be created. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve java oops immutable immutability immutable immutability class string class basic interview question Cognizant (CTS) Hybris YuMe ebizAutos Deloitte HCL Technologies Tata Consultancy (TCS) Infosys Accenture Accenture India Overstock.com Elsevier Endurance International Group SynergisticIT Verizon Capgemini Ebay Basic   frequent Try 2 Question(s) Test Q32. What is a Static import ? Core Java Anonymous
Ans. By static import , we can access the static members of a class directly without prefixing it with the class name. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve java java5 static import static java keyword static import Infosys Weather Channel Tata Consultancy (TCS) ePace Technologies basic   frequent Very frequently asked. Usually difference between String,StringBuffer and StringBuilder is asked in different variations. Q33. Difference between StringBuffer and StringBuilder ? Core Java Anonymous
Ans. StringBuffer is synchronized whereas StringBuilder is not. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve java string stringbuffer string class stringbuilder synchronized basic interview question infosys technologies Thomson Reuters Ludia QualiTest United Health Group (UHG) Sophos JPMorgan Chase ebay Infosys Technologies Experian India HCL Technologies Symantec Tata Consultancy (TCS) Accenture Accenture India Infosys Cerner Priceline basic   frequent Try 1 Question(s) Test Q34. What is reflection ? Anonymous
Ans. It is the process of examining / modifying the behaviour of an object at runtime. Sample Code for reflection Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve java reflection reflection api ebay mindtree HSBC T.G. Mercer Appirio DataArt DonLen Rackspace Gruppo Banca Sella HCL Technologies Infosys Wipro Tata Consultancy (TCS) Cognizant (CTS) SailPoint Technologies Hospira Virtusa EPAM Synechron NSEiT Full Creative Knoldus Software Mobisoft Infotech Amdocs Compro Technologies Wissen Infotech CMSS Pvt Ltd Accenture Accenture India basic   frequent Very frequently asked if being interviewed for hibernate. Frequently asked in Tata Consultancy (TCS) and Overstock.com Q35. Difference between load and get ? Hibernate Admin info@buggybread.com
Ans. If id doesnt exist in the DB load throws an exception whereas get returns null in that case.get makes the call to DB immediately whereas load makes the call to proxy. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve hibernate Overstock.com Nagarro Anthem Tata Consultancy (TCS) Nucleus Software Exports CDK Global Dell Capgemini Persistent Systems HCL Technologies Nagarro Sears CDK Global Oracle Nucleus Software Exports CACI International basic   frequent Q36. What are some different logging levels for log4j ? Log4j Admin info@buggybread.com
Ans. DEBUG
ERROR
ALL
WARN
INFO
FATAL
OFF
TRACE
TRACE_INT
WARN Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve java log4j log4j level logging error logging CrimsonLogic Infosys ADP FICO Comcast Accenture Accenture India Credit Suisse HCL Technologies Tata Consultancy (TCS) Q37. What is a cookie ? Java EE admin info@buggybread.com
Ans. A cookie is a small piece of text stored on a user's computer by the browser for a specific domain. Commonly used for authentication, storing site preferences, and server session identification. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve cookie javascript web application session management browser j2ee Wayfair OpenBet Akamai Alicen HCL Technologies Tata Consultancy (TCS) Wipro Infosys Mindtree Global Logic Accenture Accenture India Lexis Nexis Elsevier Vyom Labs SVV Geotech basic   frequent Frequently asked at HCL Technologies ( Based on 3 feedback ) Q38. Difference between Checked and Unchecked exceptions ? Core Java Anonymous
Ans. Checked exceptions are the exceptions for which compiler throws an errors if they are not checked whereas unchecked exceptions are caught during run time only and hence can't be checked. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve java exceptions checked exceptions unchecked exceptions exception handling basic interview question Verilogue F5 Network Pegasystems PegaSystems SAP Ciber Conde Nast Pramati Technologies IBM JP Morgan HCL Technologies Tata Consultancy (TCS) Cognizant (CTS) Cogent Infotech MarketAxess defense group NETS INTERNATIONAL Accenture Accenture India Integra Micro ColdLight Solutions Endeavor Deloitte Infosys Jean Martin Symantec Ancestry Overstock.com Adobe Ultimo CRIF Sapeins Flexera Sofi Morgan Stanley Barclays basic   frequent Try 1 Question(s) TestFrequently asked. Ans. Iterator is an interface that provides methods to iterate over any Collection. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve java collections iterator Magic Software Maverick Software Wipro IBM HCL Technologies Tata Consultancy (TCS) Cognizant (CTS) Wipro Accenture Accenture India American Express basic   frequent Do you think these are the Best Java Frameworks ? OpenXava SPRING MVC Apache Stripes Check everything that is Best in Java Click Here
Q40. What are transient variables in java? Core Java Anonymous
Ans. Transient variables are variable that cannot be serialized. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve java serialization transient Cognizant (CTS) American Express HCL Technologies Tata Consultancy (TCS) Accenture Accenture India Erricson Global Logic intermediate   rare