SlideShare a Scribd company logo
1 of 17
Download to read offline
Interview questions
1. What is different between String, String Buffer,
String Builder ?
 String is immutable whereas StringBuffer and StringBuider are mutable
classes.
 StringBuffer is thread safe and synchronized whereas StringBuilder is not,
thats why StringBuilder is more faster than StringBuffer.
 String concat + operator internally uses StringBuffer or StringBuilder class.
 For String manipulations in non-multi threaded environment, we should use
StringBuilder else use StringBuffer class.
TECHNICAL INTERVIEW QUESTIONS WITH ANSWER
2. Define public, private & Protected.
 Access modifiers are keywords in object-oriented languages that set the
accessibility of classes, methods, and other members.
 Access modifiers are a specific part of programming language syntax used to
facilitate the encapsulation of components.
TECHNICAL INTERVIEW QUESTIONS WITH ANSWER
3. What is Pointer ?
A pointer is a variable that stores the address of another
variable.
TECHNICAL INTERVIEW QUESTIONS WITH ANSWER
4. What is friend function ?
• It is not member function of a class to which it is a friend.
• Friend functions are declared inside the class using the friend keyword
and then they are defined outside the class.
• Friend function can access any member of a class.
TECHNICAL INTERVIEW QUESTIONS WITH ANSWER
5. What is Constructor ?
• It is a special method.
• It is used to initiate an objects.
• Once object is created, the constructor will be invoked.
• Class name = Constructor name.
• 2 types of constructor: no argument constructor, parameterized
constructor.
TECHNICAL INTERVIEW QUESTIONS WITH ANSWER
6. What is operator overloading ?
• It is the process of providing object specific functionality for the base
operators.
• That is: + - * /
• It is the type of polymorphism in which an operator is overloaded to give
user defined meaning to it.
• Overloaded operator is used to perform operation on user-defined data
type.
TECHNICAL INTERVIEW QUESTIONS WITH ANSWER
7. What is function overloading ?
• More than one function can have same name but with different
parameters. This different may occur on number of parameters, datatype,
empty parameter.
TECHNICAL INTERVIEW QUESTIONS WITH ANSWER
8. What is inline function ?
• It is one of the important feature of C++.
• Inline function is a function that is expanded in line when it is called.
• When the inline function is called whole code of the inline function gets inserted
or substituted at the point of inline function call.
TECHNICAL INTERVIEW QUESTIONS WITH ANSWER
inline return-type function-name(parameters)
{
// function code
}
9. What is Inheritance ?
• It is a mechanism where as a new class can derived from an existing class.
• Inheritance is a important pillar of OOPs concept.
• As a sub class, it inherit all the members from its base class.
• It can extend all the methods, objects of its parent class.
TECHNICAL INTERVIEW QUESTIONS WITH ANSWER
10. What is Abstraction ?
• Abstraction is selecting data from a larger pool to show only the relevant
details to the object.
• It helps to reduce programming complexity and effort.
• In Java, abstraction is accomplished using Abstract classes and interfaces.
• It is one of the most important concepts of OOPs.
• It is a method which create without an implementation. But it can extend to
implement.
• Abstraction in Java can be achieved using Abstract Class and Abstract
Method.
TECHNICAL INTERVIEW QUESTIONS WITH ANSWER
11. What is Encapsulation ?
• Encapsulation is the process of combining data and functions into a single
unit called class.
• As in encapsulation, the data in a class is hidden from other classes, so it is
also known as data-hiding.
• Encapsulation can be achieved by: Declaring all the variables in the class as
private and writing public methods in the class to set() and get() the values of
variables.
TECHNICAL INTERVIEW QUESTIONS WITH ANSWER
12. What is Recursion ?
• A recursion function is a function in which a function calls itself directly or
indirectly.
TECHNICAL INTERVIEW QUESTIONS WITH ANSWER
int fact(int n) {
if (n < = 1) // base case
return 1;
else
return n*fact(n-1); }
13. Define a Structure ?
• A structure is a user defined data type in C/C++. A structure creates a data type
that can be used to group items of possibly different types into a single type.
TECHNICAL INTERVIEW QUESTIONS WITH ANSWER
14. What is nested structure ?
• Nested structure in C is nothing but structure within structure.
• One structure can be declared inside other structure as we declare structure
members inside a structure.
• The structure variables can be a normal structure variable or a pointer variable to
access the data.
TECHNICAL INTERVIEW QUESTIONS WITH ANSWER
15. What is Pointer to Pointer ?
The first pointer is used to store the address of the variable. And the second pointer
is used to store the address of the first pointer. That is why they are also known as
double pointers.
TECHNICAL INTERVIEW QUESTIONS WITH ANSWER
SUBSCRIBE FOR MORE

More Related Content

What's hot

Java j2ee interview_questions
Java j2ee interview_questionsJava j2ee interview_questions
Java j2ee interview_questions
ppratik86
 
Bea weblogic job_interview_preparation_guide
Bea weblogic job_interview_preparation_guideBea weblogic job_interview_preparation_guide
Bea weblogic job_interview_preparation_guide
Pankaj Singh
 
Hibernate Interview Questions
Hibernate Interview QuestionsHibernate Interview Questions
Hibernate Interview Questions
Syed Shahul
 

What's hot (17)

Java interview-questions-and-answers
Java interview-questions-and-answersJava interview-questions-and-answers
Java interview-questions-and-answers
 
Hibernate3 q&a
Hibernate3 q&aHibernate3 q&a
Hibernate3 q&a
 
Java j2ee interview_questions
Java j2ee interview_questionsJava j2ee interview_questions
Java j2ee interview_questions
 
Dev labs alliance top 20 basic java interview question for sdet
Dev labs alliance top 20 basic java interview question for sdetDev labs alliance top 20 basic java interview question for sdet
Dev labs alliance top 20 basic java interview question for sdet
 
8 most expected java interview questions
8 most expected java interview questions8 most expected java interview questions
8 most expected java interview questions
 
Design pattern
Design patternDesign pattern
Design pattern
 
Java questions for interview
Java questions for interviewJava questions for interview
Java questions for interview
 
Bea weblogic job_interview_preparation_guide
Bea weblogic job_interview_preparation_guideBea weblogic job_interview_preparation_guide
Bea weblogic job_interview_preparation_guide
 
Hibernate Interview Questions
Hibernate Interview QuestionsHibernate Interview Questions
Hibernate Interview Questions
 
Top 100 Java Interview Questions with Detailed Answers
Top 100 Java Interview Questions with Detailed AnswersTop 100 Java Interview Questions with Detailed Answers
Top 100 Java Interview Questions with Detailed Answers
 
Java interview question
Java interview questionJava interview question
Java interview question
 
Java questions with answers
Java questions with answersJava questions with answers
Java questions with answers
 
Top 10 Java Interview Questions and Answers 2014
Top 10 Java Interview Questions and Answers 2014 Top 10 Java Interview Questions and Answers 2014
Top 10 Java Interview Questions and Answers 2014
 
Complete placement guide(technical)
Complete placement guide(technical)Complete placement guide(technical)
Complete placement guide(technical)
 
Lulu.com.java.j2 ee.job.interview.companion.2nd.edition.apr.2007
Lulu.com.java.j2 ee.job.interview.companion.2nd.edition.apr.2007Lulu.com.java.j2 ee.job.interview.companion.2nd.edition.apr.2007
Lulu.com.java.j2 ee.job.interview.companion.2nd.edition.apr.2007
 
Class notes(week 9) on multithreading
Class notes(week 9) on multithreadingClass notes(week 9) on multithreading
Class notes(week 9) on multithreading
 
Design pattern application
Design pattern applicationDesign pattern application
Design pattern application
 

Similar to Technical interview questions

Similar to Technical interview questions (20)

Data Structure Interview Questions & Answers
Data Structure Interview Questions & AnswersData Structure Interview Questions & Answers
Data Structure Interview Questions & Answers
 
EEE oops Vth semester viva questions with answer
EEE oops Vth semester viva questions with answerEEE oops Vth semester viva questions with answer
EEE oops Vth semester viva questions with answer
 
Question bank unit i
Question bank unit iQuestion bank unit i
Question bank unit i
 
Intervies
InterviesIntervies
Intervies
 
OOP interview questions & answers.
OOP interview questions & answers.OOP interview questions & answers.
OOP interview questions & answers.
 
Mca 504 dotnet_unit3
Mca 504 dotnet_unit3Mca 504 dotnet_unit3
Mca 504 dotnet_unit3
 
My c++
My c++My c++
My c++
 
Introduction to oop
Introduction to oopIntroduction to oop
Introduction to oop
 
Object oriented programming
Object oriented programmingObject oriented programming
Object oriented programming
 
Frequently asked tcs technical interview questions and answers
Frequently asked tcs technical interview questions and answersFrequently asked tcs technical interview questions and answers
Frequently asked tcs technical interview questions and answers
 
Principles of OOPs.pptx
Principles of OOPs.pptxPrinciples of OOPs.pptx
Principles of OOPs.pptx
 
c++ Unit I.pptx
c++ Unit I.pptxc++ Unit I.pptx
c++ Unit I.pptx
 
Tcs NQTExam technical questions
Tcs NQTExam technical questionsTcs NQTExam technical questions
Tcs NQTExam technical questions
 
Need of object oriented programming
Need of object oriented programmingNeed of object oriented programming
Need of object oriented programming
 
Java interview questions 1
Java interview questions 1Java interview questions 1
Java interview questions 1
 
Introduction to Java -unit-1
Introduction to Java -unit-1Introduction to Java -unit-1
Introduction to Java -unit-1
 
Object oriented programing
Object oriented programingObject oriented programing
Object oriented programing
 
Oops
OopsOops
Oops
 
C++ interview question
C++ interview questionC++ interview question
C++ interview question
 
Oop ppt
Oop pptOop ppt
Oop ppt
 

More from Soba Arjun

More from Soba Arjun (20)

Java modifiers
Java modifiersJava modifiers
Java modifiers
 
Java variable types
Java variable typesJava variable types
Java variable types
 
Java basic datatypes
Java basic datatypesJava basic datatypes
Java basic datatypes
 
Dbms interview questions
Dbms interview questionsDbms interview questions
Dbms interview questions
 
C interview questions
C interview questionsC interview questions
C interview questions
 
Php interview questions with answer
Php interview questions with answerPhp interview questions with answer
Php interview questions with answer
 
Computer Memory Types - Primary Memory - Secondary Memory
Computer Memory Types - Primary Memory - Secondary MemoryComputer Memory Types - Primary Memory - Secondary Memory
Computer Memory Types - Primary Memory - Secondary Memory
 
Birds sanctuaries
Birds sanctuariesBirds sanctuaries
Birds sanctuaries
 
Important operating systems
Important operating systemsImportant operating systems
Important operating systems
 
Important branches of science
Important branches of scienceImportant branches of science
Important branches of science
 
Important file extensions
Important file extensionsImportant file extensions
Important file extensions
 
Java Abstraction
Java AbstractionJava Abstraction
Java Abstraction
 
Java Polymorphism
Java PolymorphismJava Polymorphism
Java Polymorphism
 
Java Overriding
Java OverridingJava Overriding
Java Overriding
 
Java Inner Classes
Java Inner ClassesJava Inner Classes
Java Inner Classes
 
java Exception
java Exceptionjava Exception
java Exception
 
Java Methods
Java MethodsJava Methods
Java Methods
 
java Inheritance
java Inheritancejava Inheritance
java Inheritance
 
Major tribes of india
Major tribes of indiaMajor tribes of india
Major tribes of india
 
Python Modules
Python ModulesPython Modules
Python Modules
 

Recently uploaded

An Overview of Mutual Funds Bcom Project.pdf
An Overview of Mutual Funds Bcom Project.pdfAn Overview of Mutual Funds Bcom Project.pdf
An Overview of Mutual Funds Bcom Project.pdf
SanaAli374401
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
PECB
 
Gardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch LetterGardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch Letter
MateoGardella
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
QucHHunhnh
 

Recently uploaded (20)

Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
An Overview of Mutual Funds Bcom Project.pdf
An Overview of Mutual Funds Bcom Project.pdfAn Overview of Mutual Funds Bcom Project.pdf
An Overview of Mutual Funds Bcom Project.pdf
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
 
Gardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch LetterGardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch Letter
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdf
 
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptx
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 

Technical interview questions

  • 2. 1. What is different between String, String Buffer, String Builder ?  String is immutable whereas StringBuffer and StringBuider are mutable classes.  StringBuffer is thread safe and synchronized whereas StringBuilder is not, thats why StringBuilder is more faster than StringBuffer.  String concat + operator internally uses StringBuffer or StringBuilder class.  For String manipulations in non-multi threaded environment, we should use StringBuilder else use StringBuffer class. TECHNICAL INTERVIEW QUESTIONS WITH ANSWER
  • 3. 2. Define public, private & Protected.  Access modifiers are keywords in object-oriented languages that set the accessibility of classes, methods, and other members.  Access modifiers are a specific part of programming language syntax used to facilitate the encapsulation of components. TECHNICAL INTERVIEW QUESTIONS WITH ANSWER
  • 4. 3. What is Pointer ? A pointer is a variable that stores the address of another variable. TECHNICAL INTERVIEW QUESTIONS WITH ANSWER
  • 5. 4. What is friend function ? • It is not member function of a class to which it is a friend. • Friend functions are declared inside the class using the friend keyword and then they are defined outside the class. • Friend function can access any member of a class. TECHNICAL INTERVIEW QUESTIONS WITH ANSWER
  • 6. 5. What is Constructor ? • It is a special method. • It is used to initiate an objects. • Once object is created, the constructor will be invoked. • Class name = Constructor name. • 2 types of constructor: no argument constructor, parameterized constructor. TECHNICAL INTERVIEW QUESTIONS WITH ANSWER
  • 7. 6. What is operator overloading ? • It is the process of providing object specific functionality for the base operators. • That is: + - * / • It is the type of polymorphism in which an operator is overloaded to give user defined meaning to it. • Overloaded operator is used to perform operation on user-defined data type. TECHNICAL INTERVIEW QUESTIONS WITH ANSWER
  • 8. 7. What is function overloading ? • More than one function can have same name but with different parameters. This different may occur on number of parameters, datatype, empty parameter. TECHNICAL INTERVIEW QUESTIONS WITH ANSWER
  • 9. 8. What is inline function ? • It is one of the important feature of C++. • Inline function is a function that is expanded in line when it is called. • When the inline function is called whole code of the inline function gets inserted or substituted at the point of inline function call. TECHNICAL INTERVIEW QUESTIONS WITH ANSWER inline return-type function-name(parameters) { // function code }
  • 10. 9. What is Inheritance ? • It is a mechanism where as a new class can derived from an existing class. • Inheritance is a important pillar of OOPs concept. • As a sub class, it inherit all the members from its base class. • It can extend all the methods, objects of its parent class. TECHNICAL INTERVIEW QUESTIONS WITH ANSWER
  • 11. 10. What is Abstraction ? • Abstraction is selecting data from a larger pool to show only the relevant details to the object. • It helps to reduce programming complexity and effort. • In Java, abstraction is accomplished using Abstract classes and interfaces. • It is one of the most important concepts of OOPs. • It is a method which create without an implementation. But it can extend to implement. • Abstraction in Java can be achieved using Abstract Class and Abstract Method. TECHNICAL INTERVIEW QUESTIONS WITH ANSWER
  • 12. 11. What is Encapsulation ? • Encapsulation is the process of combining data and functions into a single unit called class. • As in encapsulation, the data in a class is hidden from other classes, so it is also known as data-hiding. • Encapsulation can be achieved by: Declaring all the variables in the class as private and writing public methods in the class to set() and get() the values of variables. TECHNICAL INTERVIEW QUESTIONS WITH ANSWER
  • 13. 12. What is Recursion ? • A recursion function is a function in which a function calls itself directly or indirectly. TECHNICAL INTERVIEW QUESTIONS WITH ANSWER int fact(int n) { if (n < = 1) // base case return 1; else return n*fact(n-1); }
  • 14. 13. Define a Structure ? • A structure is a user defined data type in C/C++. A structure creates a data type that can be used to group items of possibly different types into a single type. TECHNICAL INTERVIEW QUESTIONS WITH ANSWER
  • 15. 14. What is nested structure ? • Nested structure in C is nothing but structure within structure. • One structure can be declared inside other structure as we declare structure members inside a structure. • The structure variables can be a normal structure variable or a pointer variable to access the data. TECHNICAL INTERVIEW QUESTIONS WITH ANSWER
  • 16. 15. What is Pointer to Pointer ? The first pointer is used to store the address of the variable. And the second pointer is used to store the address of the first pointer. That is why they are also known as double pointers. TECHNICAL INTERVIEW QUESTIONS WITH ANSWER