Add office photos
Engaged Employer

Infosys BPM

3.7
based on 9.1k Reviews
Filter interviews by

10+ Alf Electric Vehicles Interview Questions and Answers

Updated 19 Dec 2024
Popular Designations

Q1. Examples of encapsulation and polymorphism,types of classes,what requirements we need to write a good code.

Ans.

Encapsulation and polymorphism examples, class types, and requirements for good code.

  • Encapsulation: hiding implementation details, e.g. private variables in a class

  • Polymorphism: using a single interface to represent multiple types, e.g. method overloading

  • Class types: abstract, final, static, inner, anonymous, etc.

  • Requirements for good code: readability, maintainability, efficiency, scalability, etc.

Add your answer

Q2. What is the difference between the TRUNCATE and DELETE commands in a database?

Ans.

TRUNCATE removes all records from a table, while DELETE removes specific records based on a condition.

  • TRUNCATE is faster than DELETE as it does not log individual row deletions.

  • TRUNCATE resets the auto-increment value of the table, while DELETE does not.

  • TRUNCATE cannot be rolled back, while DELETE can be rolled back if used within a transaction.

  • TRUNCATE does not trigger any delete triggers on the table, while DELETE does.

Add your answer

Q3. How to reverse a string in python

Ans.

To reverse a string in Python, we can use slicing or the built-in reversed() function.

  • Using slicing: string[::-1]

  • Using reversed() function: ''.join(reversed(string))

  • Both methods return the reversed string

Add your answer

Q4. What are the four pillars of Object-Oriented Programming (OOP)?

Ans.

The four pillars of Object-Oriented Programming are encapsulation, inheritance, polymorphism, and abstraction.

  • Encapsulation: Bundling data and methods that operate on the data into a single unit (class).

  • Inheritance: Allowing a new class to inherit properties and behavior from an existing class.

  • Polymorphism: The ability for objects of different classes to respond to the same message in different ways.

  • Abstraction: Hiding the complex implementation details and showing only the n...read more

Add your answer
Discover Alf Electric Vehicles interview dos and don'ts from real experiences

Q5. Why java doesn't support multiple inheritance?

Ans.

Java doesn't support multiple inheritance to avoid the diamond problem.

  • Multiple inheritance can lead to the diamond problem where a class inherits from two classes with a common parent.

  • This can cause ambiguity in method calls and lead to code complexity.

  • Java supports multiple interface inheritance to achieve similar functionality.

  • For example, a class can implement multiple interfaces to inherit their methods.

  • This allows for code reuse without the complexity of multiple inheri...read more

Add your answer

Q6. Write a program to find reverse of a string without using inbuilt methods

Ans.

Program to reverse a string without using inbuilt methods

  • Create an empty string to store the reversed string

  • Iterate through the original string from end to start and append each character to the new string

  • Return the reversed string

Add your answer

Q7. What is operating system What is view and tuples

Ans.

An operating system is a software that manages computer hardware and software resources and provides common services for computer programs.

  • An OS acts as an interface between the user and the computer hardware.

  • It manages memory, processes, and input/output devices.

  • Examples of OS include Windows, macOS, Linux, and Android.

  • View is a virtual table that displays data from one or more tables in a database.

  • Tuples are rows in a table that contain data for each column.

Add your answer

Q8. Why java string are immutable?

Ans.

Java strings are immutable to ensure security, thread safety, and performance optimization.

  • Immutable strings prevent malicious code from modifying the string content.

  • Immutable strings can be safely shared across multiple threads without synchronization issues.

  • Immutable strings allow for efficient memory allocation and garbage collection.

  • String pool in Java is possible because of immutability.

  • Examples of immutable classes in Java include Integer, Float, and Boolean.

Add your answer

Q9. What is compiler What is class file

Ans.

A compiler is a program that translates source code into machine code.

  • Compilers are used to convert high-level programming languages into low-level machine code.

  • They perform lexical analysis, syntax analysis, semantic analysis, and code generation.

  • Examples of compilers include GCC, Clang, and Visual C++.

  • Compilers can optimize code for performance and size.

  • Class files are the compiled output of Java source code, containing bytecode that can be executed on the Java Virtual Mach...read more

Add your answer

Q10. What is Stack and Queue?

Ans.

Stack is a data structure that follows Last In First Out (LIFO) principle. Queue is a data structure that follows First In First Out (FIFO) principle.

  • Stack: LIFO principle, push and pop operations, examples - function call stack, undo feature in software applications

  • Queue: FIFO principle, enqueue and dequeue operations, examples - printer queue, message queue in operating systems

Add your answer
Contribute & help others!
Write a review
Share interview
Contribute salary
Add office photos

Interview Process at Alf Electric Vehicles

based on 6 interviews in the last 1 year
2 Interview rounds
Aptitude Test Round
Technical Round
View more
Interview Tips & Stories
Ace your next interview with expert advice and inspiring stories

Top System Engineer Interview Questions from Similar Companies

3.9
 • 16 Interview Questions
3.7
 • 13 Interview Questions
3.8
 • 12 Interview Questions
3.9
 • 11 Interview Questions
4.1
 • 11 Interview Questions
4.0
 • 10 Interview Questions
View all
Share an Interview
Stay ahead in your career. Get AmbitionBox app
qr-code
Helping over 1 Crore job seekers every month in choosing their right fit company
70 Lakh+

Reviews

5 Lakh+

Interviews

4 Crore+

Salaries

1 Cr+

Users/Month

Contribute to help millions
Get AmbitionBox app

Made with ❤️ in India. Trademarks belong to their respective owners. All rights reserved © 2024 Info Edge (India) Ltd.

Follow us
  • Youtube
  • Instagram
  • LinkedIn
  • Facebook
  • Twitter