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
________ are devices in a computer that are in either the on or off state
Vanyuwa [196]
The appropriate response is Electrical Switches. These are electromechanical gadgets that are utilized as a part of electrical circuits to control, recognize when frameworks are outside their working reaches, flag controllers of the whereabouts of machine individuals and work pieces, give a way to manual control of machine and process capacities, control lighting, et cetera.
6 0
3 years ago
An initialization expression may be omitted from the for loop if no initialization is required.
stealth61 [152]

Answer:

True

Explanation:

for loop is used to repeat the process again and again until the condition not failed.

syntax:

for(initialize; condition; increment/decrement)

{

    Statement

}

But we can omit the initialize or condition or increment/decrement as well

the syntax after omit the initialization,

for( ; condition; increment/decrement)

{

    Statement

}

The above for loop is valid, it has no error.

Note: don't remove the semicolon.

You can omit the condition and  increment/decrement.

and place the semicolon as it is. If you remove the semicolon, then the compiler show syntax error.

5 0
3 years ago
Give two benifets to the supermarket maneger and two benifets of customers of using barcods on all items
sergey [27]

Answer:

The benefit of barcodes on items for the manager and the customers are as follow-

Explanation:

Benefits of using bar codes on all items to the manger are as follow -

  • The process of customer dealing increases by quickly scanning the item, rather than manually noting down the details.
  • The track record of all the items can be maintained properly.

Benefits of using bar codes on all items to the customers are as follow -

  • The time period to purchase any item increases, hence the customer can shop for many items in short span of time.
  • The chances of any mistake gets reduced, as everything is done digitally.
5 0
3 years ago
You are creating a table on a web page for your company's web site. your web team leader has directed you to add more white spac
lorasvet [3.4K]
You increase the cell padding
6 0
3 years ago
Look at the following assignment statements:
ziro4ka [17]

Answer: number 2 is the correct way to do it

Explanation:

3 0
2 years ago
Other questions:
  • You are looking for a backup that copies only the files that have changes since the last full backup. Which of the following wil
    13·1 answer
  • I need help!
    14·1 answer
  • The flynn effect best illustrates that the process of intelligence testing requires up-to-date ________
    14·1 answer
  • According to the video, some workers who work for themselves, such as Actors, Musicians, or Writers, may have what sort of worke
    7·1 answer
  • Do you have to make a account of Windows 10?
    12·1 answer
  • What is a third variable condition that could create the following correlation?
    10·2 answers
  • Which of the following is one of the tools in REPL.it that helps prevent syntax errors?
    10·1 answer
  • Select the correct navigational path to set the name for a cell range.
    15·2 answers
  • What read a page on website​
    15·1 answer
  • Which emerging technologies will have more injury on our day to day country &amp; How?​
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!