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. |
|
| ||||
Interview Questions and Answers for 'Tata Consultancy (TCS)' - 88 question(s) found - Order By Rating | ||||
| ||||
Ans. Message queues implement an asynchronous communication pattern between two or more processes/threads whereby the sending and receiving party do not need to interact with the message queue at the same time. Messages placed onto the queue are stored until the recipient retrieves them. Message queues have implicit or explicit limits on the size of data that may be transmitted in a single message and the number of messages that may remain outstanding on the queue. | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  message queue Asked in 1 Companies | ||||
| ||||
Ans. Spring Boot aims to shorten the code length and provide you with the easiest way to develop a web application. It helps create a stand-alone application with less or almost zero-configuration. | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve   Asked in 1 Companies | ||||
| ||||
Ans. If there is a situation to remove duplicates values from an arrayList. Developer implemented using legacy for-loop where I suggested to use Linked hash set to remove duplicates from the list. | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  Clean code Asked in 3 Companies | ||||
| ||||
This question was recently asked at 'Tata Consultancy (TCS)'.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 | ||||
| ||||
This question was recently asked at 'Tata Consultancy (TCS)'.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  hibernate versioning Asked in 1 Companies | ||||
| ||||
Ans. Inline functions , just like C++ Macros is an optimized technique used by compiler to reduce the execution time. If the function is working on pre identified values ( which aren't resolved at runtime ), the function can execute the method and evaluate the outcome at compile time only instead of making a function call at runtime. | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  inline functions  inline methods  C++ Asked in 1 Companies | ||||
| ||||
This question was recently asked at 'Tata Consultancy (TCS)'.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. 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 | ||||
| ||||
Ans. == compares values === is used in scripting languages for comparing two values as well as there data tpe. like in js,php. | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  ==  ===  == vs === Asked in 13 Companies basic   frequent | ||||
| ||||
Ans. https://www.geeksforgeeks.org/arrays-sort-in-java-with-examples/ | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  array  sorting Asked in 16 Companies basic   frequent | ||||
| ||||
Ans. The most effective and acceptable reasons for leaving your current job should be positive e.g. moving forward in your life or career | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve   Asked in 21 Companies | ||||
| ||||
Ans. To fetch records from a database, you would use SELECT statements | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve   Asked in 1 Companies | ||||
| ||||
Ans. Warm up time for certain technologies like Java ( JVM Warmup ) Performance Size of Deployable ( Bigger size packaging should go in S3 ) | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  serverless technologies  aws lambda  aws serverless computing  amazon cloud serverless computing  amazon lambda Asked in 1 Companies | ||||
| ||||
Ans. The Java collections framework (JCF) is a set of classes and interfaces that implement commonly reusable collection data structures. Although referred to as a framework, it works in a manner of a library. The JCF provides both interfaces that define various collections and classes that implement them. | ||||
Sample Code for Map Sample Code for HashMap Sample Code for Treemap Sample Code for set Sample Code for hashset Sample Code for treeset Sample Code for list Sample Code for arraylist Sample Code for linkedlist Sample Code for queue Sample Code for priorityqueue Sample Code for concurrenthashmap Sample Code for vector Sample Code for stack | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  collections Asked in 9 Companies basic   frequent | ||||
| ||||
Ans. There are four main OOP concepts in Java. These are: Abstraction. Abstraction means using simple things to represent complexity. We all know how to turn the TV on, but we don?t need to know how it works in order to enjoy it. In Java, abstraction means simple things like objects, classes, and variables represent more complex underlying code and data. This is important because it lets avoid repeating the same work multiple times. Encapsulation. This is the practice of keeping fields within a class private, then providing access to them via public methods. It?s a protective barrier that keeps the data and code safe within the class itself. This way, we can re-use objects like code components or variables without allowing open access to the data system-wide. Inheritance. This is a special feature of Object Oriented Programming in Java. It lets programmers create new classes that share some of the attributes of existing classes. This lets us build on previous work without reinventing the wheel. Polymorphism. This Java OOP concept lets programmers use the same word to mean different things in different contexts. One form of polymorphism in Java is method overloading. That?s when different meanings are implied by the code itself. The other form is method overriding. That?s when the different meanings are implied by the values of the supplied variables. See more on this below. | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  oops  oops concepts Asked in 16 Companies basic   frequent | ||||
| ||||
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 | ||||
| ||||
This question was recently asked at 'Tata Consultancy (TCS)'.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. string and wrapper class objects | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  immutability  immutable  immutability classes   immutable  immutability collections Asked in 3 Companies | ||||
| ||||
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 protection 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 Asked in 260 Companies basic   frequent | ||||
| ||||
Ans. Amazon Elastic Compute Cloud or EC2 provides scalable computing capacity in the AWS cloud. It can be used to create Virtual Environments , storage and configure. EC2 enables to upgrade or downgrade infrastructure according to the rules defined ( with fluctuation in latency, traffic etc ) | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  aws  aws ec2  aws computing  amazon cloud computing  amazon ec2  Elastic Compute Cloud  Amazon Elastic Compute Cloud Asked in 2 Companies | ||||
| ||||
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 Asked in 2 Companies Basic | ||||
Frequently asked Spring interview question. | ||||
| ||||
Ans. Core: [Core, Bean, Context, Expression Language] Web: [Web, Portlet, Servlet, etc] Data Access [JMS, JDBC, etc] AOP, Aspect | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  spring  spring framework components Asked in 12 Companies | ||||
| ||||
Ans. Authentication is the process of verifying the identity and credentials of the user to authenticate him into the system. whereas Authorization is the process by which access to a segment , method or resource is determined. Authorization is usually a step next to authentication. | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  authentication  authorization  authentication vs authorization Asked in 9 Companies basic   frequent | ||||
Usually asked to entry level software developers. | ||||
| ||||
Ans. public static void main(String[] args) { int num1 = 1; int num2 = 2; num1 = num1^num2; num2 = num1^num2; num1 = num1^num2; System.out.print("num1 = " + num1 +", num2 = "+num2); } | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  code  coding Asked in 37 Companies basic   frequent | ||||
| ||||
Ans. [Open Ended Answer] The objective of the question is to check how efficient one is in the language so that appropriate level questions are asked. Don't tell too high number if you are being interviewed for a junior or mid level position as the interviewer may throw advance level questions. | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve   Asked in 17 Companies | ||||
| ||||
Ans. An Exception in java is the occurrence during computation that is anomalous and is not expected. Exception handling is the mechanism which is used to handle such situations. | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  exception handling Asked in 18 Companies basic   frequent | ||||
| ||||
Ans. <a href="http://javahungry.blogspot.com/2015/03/difference-between-array-and-arraylist-in-java-example.html" rel="nofollow">http://javahungry.blogspot.com/2015/03/difference-between-array-and-arraylist-in-java-example.html</a> | ||||
Sample Code for ArrayList | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  array  arraylist Asked in 11 Companies basic   frequent | ||||
| ||||
Ans. A Web service is a service offered by one system to another, for communication over web through http. XML are JSON are usually used for sending across information from one system to another. | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  web service Asked in 2 Companies basic   frequent | ||||
Frequently asked in high end product companies. Frequently asked in Deloitte. | ||||
| ||||
Ans. https://medium.com/javarevisited/internal-working-of-hashmap-in-java-97aeac3c7beb#:~:text=HashMap%20internally%20uses%20HashTable%20implementation,the%20entries%20into%20the%20map. | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  hashmap  collections  hashmap internal implementation Asked in 20 Companies expert   frequent | ||||
Very Frequently asked to Senior Software Engineers or Developers. | ||||
| ||||
Ans. [Open Ended Answer] | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  design patterns Asked in 17 Companies intermediate   frequent | ||||