HEPL - A Cavinkare Group Company
20+ Flipkart Interview Questions and Answers
Q1. What is for loop?
A for loop is a control flow statement for iterating a specific number of times.
Used to iterate over a range of values or elements in an array
Consists of initialization, condition, and increment/decrement expressions
Example: for(int i=0; i<5; i++) { System.out.println(i); }
Q2. What is oops? And oops concept
OOPs stands for Object-Oriented Programming. It is a programming paradigm that uses objects to represent and manipulate data.
OOPs is based on the concept of classes and objects.
It focuses on encapsulation, inheritance, and polymorphism.
Encapsulation ensures data hiding and abstraction.
Inheritance allows the creation of new classes from existing ones.
Polymorphism enables objects to take on multiple forms.
Example: In Java, a class represents a blueprint for creating objects.
Q3. Joins and write a syntax for inner join
Inner join is used to combine rows from two or more tables based on a related column between them.
Use INNER JOIN keyword in SQL to perform inner join
Specify the columns to join on using ON keyword
Example: SELECT * FROM table1 INNER JOIN table2 ON table1.column = table2.column
Q4. Exception handling in Java?
Exception handling in Java is a mechanism to handle runtime errors and prevent program crashes.
Use try-catch blocks to handle exceptions
Use finally block to execute code regardless of exception
Use throw keyword to manually throw exceptions
Use throws keyword in method signature to declare exceptions that can be thrown
Q5. What is string in Java?
A string in Java is a sequence of characters used to represent text.
Strings are objects in Java, created using the 'String' class.
Strings are immutable, meaning their values cannot be changed once they are created.
Strings can be concatenated using the '+' operator.
Example: String str = "Hello, World!";
Q6. What is exception handling
Exception handling is a mechanism in Java to handle runtime errors and prevent program crashes.
Exception handling allows programmers to catch and handle errors that occur during program execution.
It involves using try-catch blocks to catch exceptions and provide alternative code to handle the error.
The catch block specifies the type of exception to catch and the code to be executed when that exception occurs.
Java provides a hierarchy of exception classes, with the base class ...read more
Q7. Collection in java?
Collections in Java are frameworks that provide an architecture to store and manipulate a group of objects.
Collections provide interfaces (List, Set, Map) and classes (ArrayList, LinkedList, HashSet, HashMap) to store and manipulate groups of objects.
Collections framework includes algorithms to manipulate data structures like sorting, searching, etc.
Collections are more flexible and efficient than arrays in Java.
Example: List
names = new ArrayList<>(); names.add("Alice"); nam...read more
Q8. What is oops in java
Object-oriented programming concepts in Java
OOPs stands for Object-Oriented Programming
Key concepts include classes, objects, inheritance, polymorphism, encapsulation
Java supports OOPs principles like abstraction, encapsulation, inheritance, and polymorphism
Q9. What is oops?,what is different between dbms and rdbms?,mainly concentrate on java..
OOPs is a programming paradigm based on the concept of objects. DBMS is a software system to manage databases, while RDBMS is a type of DBMS that uses a relational model.
OOPs stands for Object-Oriented Programming System
Java is an OOPs language
DBMS is a software system to manage databases
RDBMS is a type of DBMS that uses a relational model
DBMS is used for small-scale applications, while RDBMS is used for large-scale applications
Java supports RDBMS through JDBC API
Q10. What is a difference between dbms and rdbms
DBMS is a software system to manage databases while RDBMS is a type of DBMS that stores data in a structured manner.
DBMS stands for Database Management System while RDBMS stands for Relational Database Management System.
DBMS can manage any type of database while RDBMS manages only relational databases.
DBMS does not enforce any specific data model while RDBMS enforces the relational data model.
Examples of DBMS include MongoDB and Cassandra while examples of RDBMS include MySQL...read more
Q11. Oops concepts in java
Object-oriented programming concepts in Java
Encapsulation: bundling data and methods that operate on the data into a single unit
Inheritance: allows a class to inherit properties and behavior from another class
Polymorphism: ability of an object to take on many forms
Abstraction: hiding the implementation details and showing only the necessary features of an object
Q12. For loop syntax?
For loop is used to iterate over a collection of elements in Java.
Syntax: for(initialization; condition; update) { // code block }
Example: for(int i=0; i<10; i++) { System.out.println(i); }
Q13. Define Multitheding
Multithreading is the concurrent execution of two or more threads to achieve maximum utilization of CPU.
Multithreading allows multiple threads to run concurrently within a single program.
It improves performance by utilizing idle CPU time and executing multiple tasks simultaneously.
Threads can communicate and share resources, but synchronization is required to avoid conflicts.
Examples include running background tasks while the main program continues to execute, or parallel pro...read more
Q14. Syntax for for loop
For loop syntax is used for iterating over a collection of elements in Java.
Syntax: for(initialization; condition; iteration) { // code block }
Initialization: executed before the loop starts
Condition: evaluated before each iteration, loop continues if true
Iteration: executed after each iteration
Example: for(int i=0; i<10; i++) { System.out.println(i); }
Q15. Syntax for an array
Syntax for declaring an array in Java
Declare the array type followed by square brackets and the array name
Initialize the array using curly braces with values separated by commas
Example: String[] names = {"Alice", "Bob", "Charlie"}
Q16. In Bootstrap how many columns are there ?
There are 12 columns in Bootstrap grid system.
Bootstrap grid system is divided into 12 columns.
Columns can be combined to create different layouts.
Example:
will create a column that spans half of the row.
Q17. Is Java Interpreted or Compiler language ?
Java is a compiled language that is first compiled into bytecode and then interpreted by the Java Virtual Machine (JVM).
Java is first compiled into bytecode by the Java compiler.
The bytecode is then interpreted by the Java Virtual Machine (JVM) at runtime.
This combination of compilation and interpretation makes Java a compiled language with some interpreted features.
Q18. Define eloquent in laravel? What is Hasone and Hasmany in laravel? How many column can be in a bootstrap row? - It is 12
Laravel's eloquent is an ORM that allows easy interaction with databases. HasOne and HasMany are relationships between tables.
Eloquent is a powerful ORM that allows developers to interact with databases using PHP syntax.
HasOne and HasMany are two types of relationships between tables in Laravel.
HasOne is used when a table has only one related record in another table.
HasMany is used when a table has multiple related records in another table.
Bootstrap rows can have up to 12 col...read more
Q19. What are strength and weekness
My strength is my ability to learn quickly and adapt to new technologies. My weakness is that I tend to be a perfectionist.
Strength: Quick learner, adaptable to new technologies
Weakness: Perfectionist
Example: Learned a new programming language in a short amount of time for a project
Example: Spent too much time perfecting a project and missed a deadline
Q20. Write an Update Query
Update query to modify data in a database table
Use UPDATE statement followed by table name
Set the column(s) to be updated using SET keyword
Specify the new values for the column(s) to be updated
Add WHERE clause to specify the condition for updating specific rows
Q21. Define Rest API and API
API is a set of protocols and tools for building software applications. REST API is a type of API that uses HTTP requests to access and use data.
API stands for Application Programming Interface
API is a set of rules and protocols that allow different software applications to communicate with each other
REST API is a type of API that uses HTTP requests to access and use data
REST API is stateless, meaning that each request contains all the necessary information to complete it
REST...read more
Interview Process at Flipkart
Top Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month