Filter interviews by
I applied via Approached by Company and was interviewed in Dec 2021. There were 3 interview rounds.
Typecasting is the process of converting one data type to another data type in programming.
Typecasting is also known as type conversion.
There are two types of typecasting: implicit and explicit.
Implicit typecasting is done automatically by the compiler.
Explicit typecasting is done manually by the programmer.
Examples of typecasting include converting an integer to a float or a string to an integer.
Exceptions in Java are handled using try-catch blocks.
Exceptions are thrown when an error occurs during runtime.
The try block contains the code that may throw an exception.
The catch block catches the exception and handles it.
Multiple catch blocks can be used to handle different types of exceptions.
The finally block is executed regardless of whether an exception is thrown or not.
OOPS principles are the basic concepts of Object-Oriented Programming that help in designing and implementing software solutions.
Abstraction - hiding implementation details
Encapsulation - binding data and functions together
Inheritance - reusing code and creating new classes from existing ones
Polymorphism - using a single interface to represent multiple types
Composition - combining objects to create more complex ones
Java doesn't support multiple inheritance to avoid the diamond problem.
Java supports multiple interface inheritance.
Diamond problem occurs when two superclasses have a common method.
Java uses interfaces to achieve multiple inheritance.
C++ supports multiple inheritance but requires virtual inheritance to avoid the diamond problem.
Java program compiles into bytecode which is executed by JVM.
Java code is written in .java files
Compiler converts .java files into .class files containing bytecode
JVM executes the bytecode
JVM provides platform independence
Java programs can be run on any platform with JVM installed
Objects get memory in Java from the heap memory.
Java uses heap memory to allocate memory to objects.
The heap memory is managed by the JVM.
Objects are created using the 'new' keyword.
The memory allocated to an object is released by the garbage collector when it is no longer in use.
A reference variable in Java is a variable that holds the memory address of an object.
Reference variables are used to access the methods and properties of an object.
They are declared using the class name followed by the variable name.
They can be assigned null or an object of the declared class or its subclasses.
They are passed by value, but the value is the memory address of the object.
Example: String str = new String(
Yes, we can keep the reference variable of a parent class in the object of a child class.
This is possible because a child class is a type of parent class and can inherit its properties and methods.
This allows for polymorphism, where a parent class reference variable can refer to an object of a child class.
For example, if we have a parent class Animal and a child class Dog, we can create an object of Dog and assign it t
Upcasting is converting a derived class object to its base class type. Downcasting is the opposite.
Upcasting is safe and implicit
Downcasting is explicit and may cause runtime errors
Upcasting can be used for polymorphism
Downcasting is used to access derived class specific members
Example: Animal a = new Dog(); // upcasting
Example: Dog d = (Dog) a; // downcasting
Top trending discussions
posted on 12 Apr 2023
I applied via Recruitment Consulltant and was interviewed before Apr 2022. There were 3 interview rounds.
25 MCQ questions online with time limit
Create webapp . Frontend, Backend , data encryption
posted on 11 Feb 2022
I applied via Campus Placement and was interviewed in Aug 2021. There were 4 interview rounds.
1st test was aptitude and a easy coding test
The 2nd test was pure coding based test on hacker rank platform and contains 2 easy and 2 medium question
posted on 6 Jan 2025
I applied via LinkedIn and was interviewed in Dec 2024. There were 2 interview rounds.
Based on JavaScript and Java.
A task based on JavaScript.
posted on 24 Oct 2024
posted on 12 Sep 2023
I applied via Naukri.com and was interviewed before Sep 2022. There were 3 interview rounds.
Advanced JS, PHP related questions
posted on 26 Mar 2024
I applied via Approached by Company and was interviewed in Feb 2024. There was 1 interview round.
posted on 27 Aug 2024
I applied via Job Portal
Software Tester
17
salaries
| ₹2 L/yr - ₹8.5 L/yr |
Senior Software Developer
12
salaries
| ₹10 L/yr - ₹16.5 L/yr |
Software Developer
9
salaries
| ₹7 L/yr - ₹15 L/yr |
Softwaretest Engineer
5
salaries
| ₹2.7 L/yr - ₹4 L/yr |
Team Lead
5
salaries
| ₹12 L/yr - ₹15.5 L/yr |
Accel Frontline
Northcorp Software
Elentec Power India (EPI) Pvt. Ltd.
HyScaler