Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class ortaqElement {
- int[] arr1 = {4, 7, 3, 9, 2, 9, 10, 20, 33};
- int[] arr2 = {3, 2, 12, 9, 40, 32, 4, 10};
- void dOrtaq() {
- for (int i = 0; i < arr1.length; i++) {
- for (int j = 0; j < arr2.length; j++) {
- if (arr1[i] == arr2[j]) System.out.print(arr1[i] + "; ");
- }
- }
- }
- public static void main(String[] args) {
- ortaqElement obj = new ortaqElement();
- System.out.print("Ortaq elementler: ");
- obj.dOrtaq();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement