Filter interviews by
A program to print prime numbers between 1-100.
Iterate from 1 to 100
For each number, check if it is divisible by any number from 2 to itself-1
If not divisible by any number, it is a prime number
Print prime numbers between 1-100 alternately using Java.
Create a function to check if a number is prime or not.
Use a loop to iterate through numbers 1-100.
Alternate between printing prime and non-prime numbers.
Use a boolean variable to keep track of whether the last printed number was prime or not.
A Java program to calculate the power of a number using recursion.
Create a recursive function that takes two parameters: the number and the power.
If the power is 0, return 1.
If the power is 1, return the number.
Otherwise, recursively call the function with the number multiplied by itself and the power decreased by 1.
Return the result.
Overloading is having multiple methods with the same name but different parameters. Overriding is having a method in a subclass with the same name and parameters as a method in its superclass.
Overloading is compile-time polymorphism while overriding is runtime polymorphism
Overloading is used to provide different ways of calling a method with different parameters
Overriding is used to provide a specific implementation of...
Methods in thread are used to perform tasks concurrently.
Thread.start() method is used to start a new thread.
Thread.sleep() method is used to pause the execution of a thread.
Thread.join() method is used to wait for a thread to finish its execution.
Thread.yield() method is used to give a chance to other threads to execute.
To create a thread in Java, you can extend the Thread class or implement the Runnable interface.
Extend the Thread class and override the run() method
Implement the Runnable interface and pass an instance to the Thread constructor
Start the thread using the start() method
Example: Thread thread = new Thread(() -> System.out.println("Hello World")); thread.start();
Top trending discussions
Covers basics aps around 15 question
DSA based questions from leetcode easy and medium
posted on 2 Aug 2024
I applied via Job Portal and was interviewed in Feb 2024. There were 2 interview rounds.
Random Programming questions
Basic aptitude and coding problems were asked
System design and advanced algorithms were asked
I applied via Referral and was interviewed in Sep 2021. There were 3 interview rounds.
Solid Principles are a set of design principles for writing maintainable and scalable software.
Solid Principles consist of five principles: Single Responsibility Principle, Open/Closed Principle, Liskov Substitution Principle, Interface Segregation Principle, and Dependency Inversion Principle.
Single Responsibility Principle states that a class should have only one reason to change.
Open/Closed Principle states that sof...
Abstraction focuses on hiding implementation details, while interface defines a contract for classes to follow.
Abstraction allows us to focus on the essential features of an object, while hiding unnecessary details.
Interface defines a set of methods that a class must implement, providing a contract for how the class should behave.
Abstraction is achieved through abstract classes and interfaces in object-oriented program...
I applied via Naukri.com and was interviewed in Feb 2021. There were 3 interview rounds.
The number of working days and working hours for a Software Developer.
Software Developers typically work 5 days a week.
The standard working hours for Software Developers are 8 hours per day.
However, the actual number of working days and hours may vary depending on the company and project requirements.
I applied via Indeed and was interviewed before Jun 2020. There were 5 interview rounds.
I applied via Company Website and was interviewed before Jun 2020. There were 5 interview rounds.
Software Engineer
50
salaries
| ₹2.2 L/yr - ₹11 L/yr |
Softwaretest Engineer
29
salaries
| ₹2.2 L/yr - ₹7 L/yr |
Software Developer
18
salaries
| ₹2.2 L/yr - ₹12.5 L/yr |
Senior Software Test Engineer
17
salaries
| ₹7 L/yr - ₹13 L/yr |
QA Lead
6
salaries
| ₹12 L/yr - ₹17.2 L/yr |
TCS
Infosys
Wipro
HCLTech