This section focuses on Arrays and Strings, two key components of Java. You'll learn how to store, manipulate, and search through data in arrays and perform various string operations.
- Arrays - Declaration, initialization, sorting, and searching.
- Strings - String manipulation, functions like
length(),charAt(), andequals().
ArraysDemo.java- Demonstrates how to initialize and print elements of an array.Sorting.java- Sort an array in ascending and descending order.BinarySearch.java- Perform binary search on an array of integers.LinearSearch.java- Perform linear search on an array of integers.MatrixOperations.java- Perform addition and multiplication on matrices.SmallestElement.java- Find the smallest element in an array.StringDemo.java- Show usage of basic String methods.
- Write a program to initialize and print elements of an array.
- Write a program to perform a linear search on an array.
- Write a program to demonstrate any 10 String class functions.
- Write a program to sort an array of integers in ascending and descending order.
- Write a program to perform addition and multiplication on matrices.
- Write a program to find the smallest element in an array.
Once you've understood arrays and strings, proceed to Classes & Objects.
- ArraysDemo.java: Demonstrates basic array operations.
- BinarySearch.java: Implements binary search algorithm.
- LinearSearch.java: Implements linear search algorithm.
- MatrixOperations.java: Perform operations on matrices.
- SmallestElement.java: Find the smallest element in an array.
- Sorting.java: Demonstrates sorting algorithms.