KJ System
Afcons Infrastructure Interview Questions and Answers
Q1. what is the CSS style and Html difference
CSS is used to style HTML elements, while HTML is used to structure content on a webpage.
HTML provides the structure and content of a webpage, while CSS provides the visual styling.
HTML uses tags to define elements, while CSS uses selectors to target those elements.
CSS can be used to change the color, font, size, and layout of HTML elements.
HTML is used to create the skeleton of a webpage, while CSS is used to make it look visually appealing.
Q2. what is arrays
Arrays are a collection of elements of the same data type, stored in contiguous memory locations.
Arrays can store multiple values of the same type.
Elements in an array are accessed using their index.
Arrays have a fixed size, which is determined at the time of declaration.
Arrays can be used to store and manipulate data efficiently.
Example: string[] names = {"John", "Jane", "Mike"};
Q3. what is constructor
A constructor is a special method that is used to initialize objects in a class.
Constructors have the same name as the class they belong to.
They are called automatically when an object is created.
Constructors can have parameters to initialize object properties.
They can be overloaded to have multiple versions with different parameters.
Example: class Car { Car() { // constructor code } }
Q4. What is a Style sheet in CSS
A style sheet is a document containing CSS rules that define how HTML elements should be displayed on a web page.
Style sheets can be written in a separate file or embedded within an HTML document.
CSS rules consist of a selector and a declaration block containing one or more property-value pairs.
Selectors can target specific HTML elements, classes, IDs, or attributes.
CSS can be used to control layout, typography, colors, and other visual aspects of a web page.
Q5. how to find middel element of linked list
To find the middle element of a linked list, use the slow and fast pointer technique.
Initialize two pointers, slow and fast, at the head of the linked list.
Move the slow pointer by one step and the fast pointer by two steps until the fast pointer reaches the end of the list.
The position of the slow pointer will be the middle element of the linked list.
Q6. oops concepts in java
OOP concepts in Java include inheritance, encapsulation, polymorphism, and abstraction.
Inheritance allows a class to inherit properties and behavior from another class.
Encapsulation involves bundling data and methods that operate on the data into a single unit.
Polymorphism allows objects to be treated as instances of their parent class.
Abstraction hides the implementation details and only shows the necessary features to the outside world.
Q7. Types of inheritance
Types of inheritance in object-oriented programming
Single inheritance: a subclass inherits from only one superclass
Multiple inheritance: a subclass inherits from multiple superclasses
Multilevel inheritance: a subclass inherits from a superclass, which in turn inherits from another superclass
Hierarchical inheritance: multiple subclasses inherit from a single superclass
Q8. what is HTML and css
HTML and CSS are the building blocks of web development.
HTML stands for Hypertext Markup Language and is used to create the structure and content of web pages.
CSS stands for Cascading Style Sheets and is used to style and layout web pages.
HTML and CSS work together to create visually appealing and functional websites.
HTML uses tags to define elements such as headings, paragraphs, and images.
CSS uses selectors to target HTML elements and apply styles such as color, font, and l...read more
Interview Process at Afcons Infrastructure
Top Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month