1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Nuetrik [128]
3 years ago
14

Write a static method named contains that accepts two arrays of integers a1 and a2 as

Computers and Technology
1 answer:
pashok25 [27]3 years ago
5 0

Answer:

Sew explaination foe code

Explanation:

import java.lang.*;

import java.util.*;

import java.io.*;

class Main

{

public static Boolean checkSubset(int[] list1, int[] list2)

{

int l = list2.length;

for(int i = 0; i<list1.length-l; i++)

{

Boolean flag = true;

for(int j = 0; j<list2.length; j++)

{

if(list1[i+j] != list2[j])

{

flag = false;

break;

}

}

if(flag) return true;

}

return false;

}

public static void main(String args[])

{

int[] l1 = {1,6,2,1,4,1,2,1,8};

int[] l2 = {1,2,2};

System.out.println(checkSubset(l1,l2));

}

}

You might be interested in
A computer is defined by 4 specific criteri. Select all 4.*
VikaD [51]

Answer:

Explanation:

Receive input, produce output, store information, process information

8 0
3 years ago
A network administrator receives a call from the sales department requesting ports 20 and 21 be opened on the company’s firewall
emmainna [20.7K]

Answer:Document the reason for the request, Follow the company’s approval process for the implementation

Explanation:

The port 20 and 21 are used for the FTP connection, so before opening port 20 and 21 it is necessary to abide by the company data security policy which includes documenting the reason for the request and following company's approval process for its implementation.

8 0
3 years ago
3) Write a program named Full_XmasTree using a nested for loop that will generate the exact output. This program MUST use (ONLY)
N76 [4]

Answer:

Following are the code to this question:

//import package

import java.util.*;  

public class Full_XmasTree   //defining class

{        

// defining main method

public static void main(String as[])  

   {  

       int X,a,b; //defining integer variable

       Scanner obx = new Scanner(System.in); // creating Scanner class object

       System.out.print("Please enter: "); //print message

       X = obx.nextInt(); // input value from user

       for (a = 0; a < X; a++) //defining loop to print pattern  

       {

           for (b = X - a; b > 1; b--)//use loop for print white space  

           {

           System.out.print(" ");//print space

           }

           for (b = 0; b <= a; b++) // use loop to print values  

           {

               System.out.print("* "); //print asterisk values

           }

           System.out.println(); //using print method for new line

       }

   }

}

Output:

please find the attachment.

Explanation:

In the given java code, a class "Full_XmasTree" is declared, in which the main method is declared, inside this method three integer variable "X, a, and b", in this variables "a and b" is used in a loop, and variable X is used for user input.

  • In the next line, the Scanner class object is created, which takes input in variable X, and for loop is used to print asterisk triangle.
  • In the first for loop, use variable a to count from user input value, inside the loop, two for loop is used, in which first is used to print white space and second is used for the print pattern.

8 0
3 years ago
Which of the following statements are true about file naming conventions? Check all of the boxes that apply.
Korolek [52]

Answer:

last one check it and the second one

Explanation:

8 0
3 years ago
Read 2 more answers
I need help, who is a great phone pin lock screen cracker?
svlad2 [7]

Answer:

738159

now it's depend on you.

4 0
2 years ago
Other questions:
  • Finding information on the web was made easier by _____________, which provide on-screen menus, making navigation of the web as
    12·1 answer
  • Write a function named get_my_age that returns your age as an int (this is YOUR age, so if you were 21 you would return the numb
    11·1 answer
  • A program that coaches you at each step in the process is said to have a(n)
    12·2 answers
  • Which animation effects allow text or images to show movement on a slide? Check all that apply. Entrance, Emphasis, Exit, Motion
    5·2 answers
  • How is a ink pen better than a digital pen.
    8·1 answer
  • When a new word processing software program is released, companies that might use it must consider not only the cost of buying i
    13·1 answer
  • Which term is used in object-oriented programming to reference characteristics of an object?
    15·1 answer
  • Select the correct answer from each drop-down menu.
    7·1 answer
  • Kylee needs to ensure that if a particular client sends her an email while she is on vacation, the email is forwarded to a
    5·1 answer
  • What font family is Times New Roman an what font family is Arial?
    9·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!