CampusPreparation and Learn coding for software professional

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

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

20/01/2023
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.

06/11/2020

In Javascript var is used for variable declaration.ECMA6 script another 2 added that is let and const.
var declaration is for function scope.
let is for block scope. const is for constant declaration

10/09/2020

RDBMS
DDL commands are create, alter, truncate, drop.
DML commands are insert, delete, update
DCL commands are select
TCL commands are commit, rollback

20/08/2020

int i=5;
printf("%d %d %d",i++,i, ++i );

output is 677

21/07/2020

Javascript is a weak type language means you can declare a variable without data type like example

var a
a=12

here a is automatically treated as integer but in other java you can declare it as int.
So java is a strong type object oriented language.

07/06/2020

Self join is a join in SQL when you are querying with same table as alias

Want your school to be the top-listed School/college in Bhubaneswar?
Click here to claim your Sponsored Listing.

Category

Telephone

Website

Address


Bhubaneswar

Other Education in Bhubaneswar (show all)
Reseapro Reseapro
4th Floor(North West), OCAC Tower, Plot No-N-1/7D, Acharya Vihar
Bhubaneswar, 751013

Reseapro Scientific Services (P) Limited is a leading research service based company specializing in

Kidcave Daycare Kidcave Daycare
EKAMRA VIHAR, SUNDARPADA
Bhubaneswar

it's a fun, learning, creativity page for kids

The Magic Square Classes The Magic Square Classes
Rasulgarh
Bhubaneswar, 751022

We Provide the Qualified and Trained Teachers of one of the best Teacher Training institute in India

T90 Classes T90 Classes
Bhubaneswar

Adding a new chapter to your life..

GYAN GURU GYAN GURU
Bhubaneswar

gyan se dunia jito...

ashoksabar158 ashoksabar158
Bhubaneswar

nice

EK Education Odisha EK Education Odisha
Mayurbhanj
Bhubaneswar, 757034

Hello friends ,Welcome to my page EK EDUCATION ODISHA .Here you can watch education,current events and life related information which will be helpful for healthy living .Stay conne...

Sure Success Bbsr Sure Success Bbsr
Bhubaneswar

sure Success a education institute at Bhubaneswar that provides curses like B.Ed , B.P.Ed , B.H.Ed ,

Upsqills Edutech Upsqills Edutech
Patia
Bhubaneswar, 751024

Spoken English & Softskill Training

Create Your Identity Create Your Identity
HIG/18
Bhubaneswar, 751013

The objective of forming this community is to empower and equip the entire student fraternity with essential skills set, positive image building, and influential and persuasive mor...

Animation pathsala Animation pathsala
Saheed Nagar
Bhubaneswar

Animation courses are available here

Knowledge Knowledge
GUJURALI
Bhubaneswar

You can get all knowledge on this page.......