Java - Interview Questions and Answers for 'Barclays' | Search Java Interview Question - javasearch.buggybread.com
Javasearch.buggybread.com
Share

Search Java Interview Questions


 2137 questions in repository.
 There are more than 200 unanswered questions.
Click here and help us by providing the answer.
Label / Company      Label / Company / Text

   



Barclay


   




Interview Questions and Answers for 'Barclays' - 11 question(s) found - Order By Newest

Advanced level question. Frequently asked in High end product companies. Frequently asked in Cognizant ( Based on 2 feedbacks )
  Q1. Why is String immutable in Java ?Core Java
Anonymous
Ans. 1. String Pool - When a string is created and if it exists in the pool, the reference of the existing string will be returned instead of creating a new object. If string is not immutable, changing the string with one reference will lead to the wrong value for the other references.

Example -

String str1 = "String1";
String str2 = "String1"; // It doesn't create a new String and rather reuses the string literal from pool

// Now both str1 and str2 pointing to same string object in pool, changing str1 will change it for str2 too

2. To Cache its Hashcode - If string is not immutable, One can change its hashcode and hence it's not fit to be cached.

3. Security - String is widely used as parameter for many java classes, e.g. network connection, opening files, etc. Making it mutable might possess threats due to interception by the other code segment.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like      Discuss      Correct / Improve     java   oops   string   string class   immutable   advanced     Barclays  Jungo  Cloudera  Allston  Man Group  Prokarma  Optimus  Gamesys  ABS  TransPerfect  Fidelity  Deloitte  Zalando  Cognizant (CTS)  Zeta Interactive  SuccessFactors   EchoStar  InterGlobe Technologies  HCL Technologies  Intuit  JP Morgan  Optimus Information  Faichi Solutions  Blip  Adobe  Subex Limited  Remo Software  Allstate  IBM  Bizmatics  Bytecode Cyber Security  Calsoft Systems  IDS Infotech      expert        frequent

Try 4 Question(s) Test


 Q2. 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)


Almost sure to be asked in every company using any Dependency Injection framework ( Spring, Guice etc )
  Q3. 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  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


Very frequently asked in companies using SOA.
  Q4. 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      intermediate        frequent


 Q5. What is servlet Chaining ?Java EE
Anonymous
Ans. Multiple servlets serving the request in chain.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like      Discuss      Correct / Improve     java   web application   servlets     Barclays        rare


 Q6. Difference between Assert and Verify ?
admin
info@buggybread.com
Ans. Assert works only if assertions ( -ea ) are enabled which is not required for Verify.

Assert throws an exception and hence doesn't continue with the test if assert evaluates to false whereas it's not so with Verify.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like      Discuss      Correct / Improve     assert   junit   mockito   verify   testing   unit testing   barclays


 Q7. What is the difference between namenode and datanode in Hadoop? BigData
Admin
info@buggybread.com
Ans. NameNode stores MetaData (No of Blocks, On Which Rack which DataNode is stored etc) whereas the DataNode stores the actual Data.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like      Discuss      Correct / Improve     hadoop   at&t     Barclays  AT&T


Must know at all levels. Among Top 10 frequently asked questions in Java. Very frequently asked to fresh graduates or less experienced professionals.
  Q8. What is Inheritance ?Core Java

Ans. Its a facility for code reuse and independent extension wherein a derived class inherits the properties of parent class.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like      Discuss      Correct / Improve     inheritance  oops concepts  java concepts  code reuse  code re-use   classes  derived classes     Maverick Software  Infosys  HCL Technologies  Tata Consultancy (TCS)  Cognizant (CTS)  Myntra  Capital One  Barclays  Accenture  Infoview Technologies  Wipro  Paragyte      basic        frequent


 Q9. What is the use of Combiners ?BigData2016-10-17 10:03:41

Ans. Combiners are used to increase the efficiency of a Map Reduce program. They are used to aggregate intermediate map output locally on individual mapper outputs. Combiners can help you reduce the amount of data that needs to be transferred across to the reducers.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like      Discuss      Correct / Improve     Hadoop Systems  BigData   hadoop combiners     Barclays



Do you think these are the Best Java Frameworks ?

OpenXavaSPRING MVCApache StripesCheck everything
that is Best in Java

Click Here



 Q10. What will be the output of following code

public class BuggyBread {
   static class A {
      A() {
         f();
      }

      public void f() {
         System.out.println("A ctor");
      }
   }

   static class B extends A {
      B() {
         f();
      }

      public void f() {
         System.out.println("B ctor");
      }
   }

   public static void main(String[] args) {
      B b = new B();
      b.f();
      A a = new A();
      a.f();
   }
}
Core Java2017-01-10 13:08:58

Ans. B ctor
B ctor
B ctor
A ctor
A ctor

 Help us improve. Please let us know the company, where you were asked this question :   

   Like      Discuss      Correct / Improve          Barclays


 Q11. What is abstraction ?2017-10-13 09:23:38

 This question was recently asked at 'Tata Consultancy (TCS),HCL Technologies,Infosys,Deegit,Barclays,General Electric (GE),Capgemini,Accenture,Polaris,IBM,eGov Jamaica,Skillnet Solutions,Mastek,Avvo,Computer Science Corporation (CSC),Revature,Erricson,Allianz,Fidelity Information Services (FIS)'.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          Tata Consultancy (TCS)  HCL Technologies  Infosys  Deegit  Barclays  General Electric (GE)  Capgemini  Accenture  Polaris  IBM  eGov Jamaica  Skillnet Solutions  Mastek  Avvo  Computer Science Corporation (CSC)  Revature  Erricson  Allianz  Fidelity Information Services (FIS)




Subscribe to Java News and Posts. Get latest updates and posts on Java from Buggybread.com
Enter your email address:
Delivered by FeedBurner



comments powered by Disqus
 

Help us and Others Improve. Please let us know the questions asked in any of your previous interview.

Any input from you will be highly appreciated and It will unlock the application for 10 more requests.

Company Name:
Questions Asked:
         

X Close this

11 person from are looking for questions for 'Barclays'. Connect with them to better prepare for your interview.Click here and post a message

Barclay: I had 5 rounds of interview for a ... Anonymous

X Close this

Help Us Improve.
Please share your
interview experience.

Company Name:   


Questions Asked: