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

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.
Label / Company      Label / Company / Text

   



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

Advanced level question. Frequently asked in High end product companies. Frequently asked in Google , Cognizant and Deloitte ( Based on 2 feedback )
  Q1. Why is String immutable in Java ?Core Java
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  immutability   advanced     Asked in 39 Companies      expert        frequent

Try 4 Question(s) Test


Very frequently asked in companies using SOA.
  Q2. What are RESTful Web Services ?Rest
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     Asked in 14 Companies      intermediate        frequent


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     Asked in 83 Companies      intermediate        frequent


 Q4. What is JUnitRunner ?JUnit
 This question was recently asked at 'Barclays'.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


 Q5. What are the contents of Hibernate configuration file ( hibernate.cfg.xml ) ?Hibernate
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     Asked in 11 Companies


Frequently asked at HCL Technologies ( Based on 3 feedback )
  Q6. Difference between Checked and Unchecked exceptions ?Core Java
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   checked vs unchecked exceptions     Asked in 39 Companies      basic        frequent

Try 1 Question(s) Test


 Q7. What is abstraction ?Design
Ans. Abstraction is a process of hiding the implementation details and describing only the functionality to the user.

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

   Like         Discuss         Correct / Improve     bstraction  oops concepts  oops principle     Asked in 22 Companies


 Q8. What is servlet Chaining ?Java EE
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     Asked in 1 Companies        rare


 Q9. Difference between Assert and Verify ?Testing
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     Asked in 5 Companies


 Q10. What is the difference between namenode and datanode in Hadoop? BigData
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     Asked in 2 Companies


Must know at all levels. Among Top 10 frequently asked questions in Java. Very frequently asked to fresh graduates or less experienced professionals.
  Q11. 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  object oriented programming (oops)  oops concepts  oops concepts  java concepts  code reuse  code re-use   classes  derived classes     Asked in 14 Companies      basic        frequent


 Q12. What is the use of Combiners ?BigData
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     Asked in 1 Companies


 Q13. 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 Java
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          Asked in 1 Companies


 Q14. What is TypeCasting ?Core Java
Ans. Assigning a value of one type to a variable of another type is known as Type Casting.

Example :

int x = 10;
byte y = (byte)x;

In Java, type casting is classified into two types, Widening Casting(Implicit) widening-type-conversion and Narrowing Casting (Explicitly done) narrowing-type-conversion.

Widening or Automatic type converion - Automatic Type casting take place when,the two types are compatible and the target type is larger than the source type

Example :

public class Test {
public static void main(String[] args) {
int i = 100;
long l = i; //no explicit type casting required
float f = l;//no explicit type casting required
System.out.println("Int value " i);
System.out.println("Long value " l);
System.out.println("Float value " f);
}
}

Narrowing or Explicit type conversion - When you are assigning a larger type value to a variable of smaller type, then you need to perform explicit type casting.

Example :

public class Test{
public static void main(String[] args) {
double d = 100.04;
long l = (long)d; //explicit type casting required
int i = (int)l;//explicit type casting required
System.out.println("Double value " d);
System.out.println("Long value " l);
System.out.println("Int value " i);
}
}

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

   Like         Discuss         Correct / Improve     typecasting  type casting     Asked in 23 Companies


 Q15. What is life cycle of cloud deployment process ?Cloud Computing
 This question was recently asked at 'Barclays'.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     Google Cloud Platform (GCP)  Amazon Web Services (AWS)     Asked in 1 Companies


 Q16. What kind of deployable is created for the angular project ?Angular Js
 This question was recently asked at 'Barclays'.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


 Q17. What would you do if your rest services aren't responding fast enough ?Rest
 This question was recently asked at 'Symantec,Barclays'.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 2 Companies


 Q18. When you build an angular application, what type of file it creates which we can deploy?Angular JS
 This question was recently asked at 'Barclays'.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


 Q19. How you debug and troubleshoot slowness with a REST call?Rest
 This question was recently asked at 'Barclays'.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



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: