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
zimovet [89]
3 years ago
9

Assume that you have an ArrayList variable named a containing 4 elements, and an object named element that is the correct type t

o be stored in the ArrayList.
Which of these statements adds the object to the end of the collection?1. a[3] = element;
2. a.add(element;
3. a[4] = element;
4. a.add(element);
Computers and Technology
1 answer:
jonny [76]3 years ago
7 0

Answer:

Option (4) is the correct answer.

Explanation:

In Java programming language ,array collection starts from 0 index location and ends in a size-1 index location. So to access the last elements the user needs to use a[Size-1] statement. so to modify the value of the last location of the array the user needs to use "a[size-1]= element;".

But when the user wants to add some new value to the end of the array list collection then he needs to use the statement--

a.add(element); //where add is a function, element is a value and a is a array list object.

Another option is invalid because--

  • Option 1 is not the correct because "a[3]=element;" modify the value of the 3rd element of the array.
  • Option 2 gives a compile-time error because add functions bracts are not closed.
  • Option 3 gives the error because a[4] gives the location of the 5th element of the array but the above question says that a is defined with 4 elements.
You might be interested in
How is this fictional tex in the people could fly different from the nonfictional text​
jenyasd209 [6]
The answer to this is C.
6 0
3 years ago
Read 2 more answers
What type of attack occurs when the threat actor snoops and intercepts the digital data transmitted by the computer and resends
vaieri [72.5K]

The  type of attack occurs when the threat actor snoops and intercepts the digital data transmitted by the computer and resends that data, impersonating the user is called replay.

<h3>What is replay attacks in security?</h3>

A replay attack is known to be a kind of security attack that is known to be done if  or when a cybercriminal is said to spy on a secure network communication.

Note that by this, they tend to intercepts the message  and then they can fraudulently delays or as well as resends it to misdirect the receiver into carrying out the thing that  the hacker wants.

Hence, The  type of attack occurs when the threat actor snoops and intercepts the digital data transmitted by the computer and resends that data, impersonating the user is called replay.

learn more about  digital data from

brainly.com/question/28346439

#SPJ1

8 0
1 year ago
When someone registers a domain name that is a company's trademark, hoping to resell it to the company at an exorbitant profit,
zysi [14]

Answer:

2. testing cybersquatting

Explanation:

Phishing is the fraudulent attempt to obtain sensitive information such as usernames, passwords and credit card details by disguising oneself as a trustworthy entity in an electronic communication. In this case, phishing domain refer to a domain that is not a trustworthy one but try to deceive user into using it in place of the genuine domain.

Cybersquatting also known as domain squatting is registering, selling or using a domain name with the intent of profiting from the goodwill of someone else's trademark. It generally refers to the practice of buying up domain names that use the names of existing businesses with the intent to sell the names for a profit to those businesses.

Identity theft is the illegal use of someone else's personal information in order to obtain money or credit. It is the deliberate use of someone else's identity, usually as a method to gain a financial advantage or obtain credit and other benefits in the other person's name, and perhaps to the other person's disadvantage or loss.

From the above definition, it is seen that someone registering a domain name that is a company's trademark, hoping to resell it to the company at an exorbitant profit is called testing cybersquatting.

3 0
3 years ago
Read 2 more answers
Identify the correct XHTML syntax for inserting an image as a hyperlink from the options provided. A. book.gif B. C. D.
mariarad [96]

Answer:

The Correct syntax for inserting an image as hyperlink is given in explanation section

Explanation:

To make an image act as a hyperlink, place the image element within the HTML anchor "<a></a>"  element.

The syntax of inserting image hyperlink in XHTML is given below.

<a href = "link_that_can_be_accessible"><img src="source of image" alt="display name if image not shown in the browser" border="0"/></a>

for example lets insert image as hyperlink

<a href="ajax.html"><img src="logo.gif" alt="AJAX" border="0" /></a>

The default appearance is a blue border around the image. Specifying border="0" removes the border around the image.

if you want to insert image from another folder then the image hyperlink looks like this:

<a href="ajax.html"><img src="/images/html5/logo.gif" alt="AJAX" border="0" /></a>

If you want to insert image from another server then image hyper link looks like this:

<a href="ajax.html"><img src="https://www.myExample.com/images/html5/logo.gif" alt="AJAX" border="0" /></a>

4 0
3 years ago
The idea generating technique most often used in writing business letter is ?
aivan3 [116]
Hihi!

The correct answer is free writing! Free writing <span>is a prewriting technique in which a person writes continuously for a set period of time without regard to spelling, grammar, or topic! People tend to use it because it produces raw, often unusable material, but helps </span>writers<span> overcome blocks of apathy and self-criticism!</span>

I hope I helped!
-Jailbaitasmr
6 0
3 years ago
Read 2 more answers
Other questions:
  • Although the battery on your smartphone is fully charged, it drains quickly. In some instances when the phone shows that the bat
    12·1 answer
  • Which of the following journals is not aimed at the public as well as scientists?
    7·1 answer
  • On a hard disk each track is divided into invisible wedge-shaped sections called _______
    15·1 answer
  • Your program will demonstrate use of arrays, searching an array, using methods, passing parameters by reference, returning value
    13·1 answer
  • The most complex part of ssl is the ___________ protocol.
    7·2 answers
  • Write a grammar for the language consisting of strings built only of the letters a and b. The strings may have any number of the
    6·1 answer
  • Write a SELECT statement that returns three columns: EmailAddress, OrderID, and the order total for each customer. To do this, y
    14·1 answer
  • Write a summary of five things that you learned about CSS. Do not copy and paste the information. Summarize each point in your o
    5·1 answer
  • You are not sure if a certain word has an"e"at the end<br>​
    11·1 answer
  • A regional transportation and logistics company recently hired its first ChiefInformation Security Officer (CISO). The CISO’s fi
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!