Found 34 Articles for Campus Interview

Top Kubernetes Interview questions

Aadyaa Srivastava
Updated on 27-Feb-2023 09:51:25

771 Views

The best orchestration technology nowadays is Kubernetes, which has become the industry buzzword. It draws a lot of seasoned employees looking to go up the corporate ladder. International businesses including Huawei, Pokémon, eBay, Yahoo Japan, SAP, Open AI, and Sound Cloud utilize Kubernetes on a daily basis. The market, however, is lacking in Kubernetes Certified experts. I assume you already are aware of these details, which led you to this post about Kubernetes Interview Questions. This article will help you learn about the most common interview questions. Describe Kubernetes An open-source container management platform called Kubernetes is in charge of ... Read More

Java Program to Convert the local Time to GMT

Aishwarya Naglot
Updated on 18-Jun-2025 16:23:01

3K+ Views

In this article, we will learn how to convert the local time to GMT (Greenwich Mean Time) in Java. We need this conversion when we want to standardize time across different time zones or when working with systems that require GMT. We will cover the following methods to convert local time to GMT: Using ZonedDateTime class Using Calendar Class Using Date Class Using ZonedDateTime Class ZonedDateTime class was introduced in Java 8, which is used for converting local time to GMT. We can use the ... Read More

Java Program to Iterate over ArrayList using Lambda Expression

Aishwarya Naglot
Updated on 10-Jun-2025 14:26:28

3K+ Views

The ArrayList class is a resizable array that can be found in java.util package. The difference between a built-in array and an ArrayList in Java is that the size of an array cannot be modified. Lambda Expression is a feature that was introduced in Java 8. It is useful when we use collections, such as ArrayList, Set, or Map, and we want to perform operations on the elements of these collections. In this article, we will learn how to iterate over an ArrayList using a lambda expression in Java. Iterating Over an ArrayList Using Lambda Expressions There are two main ... Read More

Java Program to Pass ArrayList as the function argument

Aishwarya Naglot
Updated on 18-Jun-2025 16:25:40

4K+ Views

The ArrayList is a resizable array, which is part of java.util package. The difference between a built-in array and an ArrayList in Java is that the size of an array cannot be modified. In this article, we will understand how to pass an ArrayList as a function argument. Following are the ways to pass an ArrayList as a function argument: Using Function Argument Using Return Type Using Function Argument We can pass an ArrayList as a function argument in Java. The function can take an ArrayList as a parameter and perform operations ... Read More

Mobile

Java Program to Sort map by keys

Alshifa Hasnain
Updated on 17-Jan-2025 19:45:03

766 Views

In this article, we will learn to sort maps by keys in Java. In Java, the Map interface provides a collection of key-value pairs where each key is unique. Sorting a map by its keys can be useful when you want to order the elements based on the keys instead of their values. Sorting a Map in Java Java provides different ways to sort a map by keys. A TreeMap, a part of the java.util package is one of the easiest ways to sort a map. It stores the map entries in a natural order (ascending) based on the ... Read More

Java Program to Check if a set is the subset of another set

Aishwarya Naglot
Updated on 18-Jun-2025 16:27:32

1K+ Views

In this article, we will understand how to check if a Set is a subset of another set. A Set is a Collection that cannot contain duplicate elements. It models the mathematical set abstraction. The Set interface contains only methods inherited from Collection and adds the restriction that duplicate elements are not allowed. Following are the ways to check if a set is a subset of another set: Using containsAll() Method Using Stream API Using containsAll() Method In Java, the set interface has a method called containsAll() that checks ... Read More

Java program to detect loop in a LinkedList

Aishwarya Naglot
Updated on 18-Jun-2025 12:20:51

610 Views

What is a LinkedList? A Linked list is a sequence of data structures where each node contains two parts as follows - Data: The value or information stored in the node. Next: A reference (or pointer) to the next node in the sequence. Detecting a Loop in a LinkedList A loop or cycle means that the last node of a linked list is connected back to one of the nodes earlier in the list, creating a cycle. Or, the next pointer of a node points to itself. The following are the ways ... Read More

Java program to remove duplicate elements from ArrayList

Aishwarya Naglot
Updated on 17-Jun-2025 19:36:33

3K+ Views

ArrayList class in Java is a part of the Java Collections Framework and is used for storing a dynamically sized collection of elements. It is similar to an array, but it can grow and shrink in size according to the requirements of the program.Removing Duplicate Elements from an ArrayList In an ArrayList, we can store duplicate elements. In this article, we will see how to remove duplicate elements from an ArrayList in Java. The following are the methods we will use to remove duplicate elements from an ArrayList: Using removeIf() Method ... Read More

Java Program to Convert the ArrayList into a String and Vice Versa

AmitDiwan
Updated on 23-Jan-2025 23:00:23

497 Views

In this article, we will understand how to convert the ArrayList into a string and vice versa. The ArrayList class is a resizable array, which can be found in the java. util package. The difference between a built-in array and an ArrayList in Java is that the size of an array cannot be modified. ArrayList definitionAn ArrayList in Java is a resizable array found in the java.util package, which allows for dynamic modifications in size as elements are added or removed. It supports ... Read More

Java Program to Convert the LinkedList into an Array and vice versa

AmitDiwan
Updated on 30-Mar-2022 08:20:05

485 Views

In this article, we will understand how to convert the linked list into an array and vice versa. The java.util.LinkedList class operations perform we can expect for a doubly-linked list. Operations that index into the list will traverse the list from the beginning or the end, whichever is closer to the specified index.Below is a demonstration of the same −Suppose our input is −The list is defined as: [Java, Python, Scala, Mysql]The desired output would be −The result array is: Java Python Scala MysqlAlgorithmStep 1 - START Step 2 - Declare namely Step 3 - Define the values. Step 4 ... Read More

Advertisements