CampusPreparation and Learn coding for software professional

CampusPreparation and Learn coding for software professional

Share

C, C++,Java8, Oracle, MySQL, Spring,Microservice, Lambada Expression,Angular,Java Script,RestAPI

29/04/2026

Some pattern logic. I need to explain it in live session

10/03/2026

Today some more content regarding functional programming will posted in this page.

05/01/2026

A very happy new year to all dear student. We will start this 2026 with functional programming and python programming language. So stay curious. Thank you all and love you all

20/05/2025

1 . Let’s start from javascript and Rxjs first

Some excited session will come just relax

08/04/2025

Variable hoisting in javascript

With var declaration it doesn’t effect compiler where it is defined. We can use it before declaration also but with let and const it will give error.

22/12/2023

Java 8 new features

1.Functional Interface
2.Single Abstract Method
3. Lambda expression
4.java. Time util package
5. Steam API

1. Functional Interface is a interface which is having one abstract method

Ex:- Runnable, Comparator

22/09/2022

// JAVA Code for Find Second largest
// element in an array
class GFG {

/* Function to print the second largest
elements */
public static void print2largest(int arr[],
int arr_size)
{
int i, first, second;

/* There should be atleast two elements */
if (arr_size < 2) {
System.out.print(" Invalid Input ");
return;
}

first = second = Integer.MIN_VALUE;
for (i = 0; i < arr_size; i++) {
/* If current element is greater than
first then update both first and second */
if (arr[i] > first) {
second = first;
first = arr[i];
}

/* If arr[i] is in between first and
second then update second */
else if (arr[i] > second && arr[i] != first)
second = arr[i];
}

if (second == Integer.MIN_VALUE)
System.out.print("There is no second largest"
+ " element\n");
else
System.out.print("The second largest element"
+ " is " + second);
}

/* Driver program to test above function */
public static void main(String[] args)
{
int arr[] = { 12, 35, 1, 10, 34, 1 };
int n = arr.length;
print2largest(arr, n);
}
}

22/09/2022

// JAVA Code for Find Second largest
// element in an array
class SecondLargest{

/* Function to print the second largest
elements */
public static void print2largest(int arr[],
int arr_size)
{
int i, first, second;

/* There should be atleast two elements */
if (arr_size < 2) {
System.out.print(" Invalid Input ");
return;
}

first = second = Integer.MIN_VALUE;
for (i = 0; i < arr_size; i++) {
/* If current element is greater than
first then update both first and second */
if (arr[i] > first) {
second = first;
first = arr[i];
}

/* If arr[i] is in between first and
second then update second */
else if (arr[i] > second && arr[i] != first)
second = arr[i];
}

if (second == Integer.MIN_VALUE)
System.out.print("There is no second largest"
+ " element\n");
else
System.out.print("The second largest element"
+ " is " + second);
}

/* Driver program to test above function */
public static void main(String[] args)
{
int arr[] = { 12, 35, 1, 10, 34, 1 };
int n = arr.length;
print2largest(arr, n);
}
}

22/09/2022

Find the second largest element in a single traversal.

1) Initialize the first as 0(i.e, index of arr[0] element
2) Start traversing the array from array[1],
a) If the current element in array say arr[i] is greater
than first. Then update first and second as,
second = first
first = arr[i]
b) If the current element is in between first and second,
then update second to store the value of current variable as
second = arr[i]
3) Return the value stored in second.🙂

24/09/2021

Dependency injection in spring defines dependency between 2 class is through constructor and not creating of one class object inside another class.In that case lowcoupling can achieve and testing is easy and code is maintainable

15/05/2021

== check 2 datas are same or not
=== checks datas along with datatypes,so it is called strict equal type.

Want your school to be the top-listed School/college in Bhubaneswar?

Click here to claim your Sponsored Listing.

Location

Category

Telephone

Website

Address


Bhubaneswar