logo
Explore
logo
Explore
Back ArrowExplore all topics
technology logo
technology logo

New List

share link

by deepak8 dot icon Updated: Mar 9, 2023

1-Click Kit 1-Click Kit  

1-Click Kit

1-Click Kit installer

Sample Kit

www.google.com

Search for an element in the array .

javadotLines of Code : 13dotLicense : Permissive (MIT License)

public static void main(String[] args) 
	{ 
		int[] arr = { 3, 4, 1, 7, 5 }; 
		int n = arr.length; 
		
		int x = 4; 

		int index = search(arr, n, x); 
		if (index == -1) 
			System.out.println("Element is not present in the array"); 
		else
			System.out.println("Element found at position " + index); 
	}

Open Weaver – Develop Applications Faster with Open Source

kandi

Develop Custom Functions
Develop Projects with Kits
Explore Popular Libraries
FAQ

Community and Support

Live Bootcamps
Self Paced Certifications
Hackathons and Events
FutureSkills Prime
kandi Support

Company

About Us
Join the Team
Contact Us

Follow

  • Terms
  • Privacy policy
  • © 2023 Open Weaver Inc.

  • Terms
  • Privacy policy
  • © 2023 Open Weaver Inc.