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
laila [671]
3 years ago
8

Write a method that returns a String that is just the first and last character of the given string Your return value should be o

nly two characters long. You can assume that the given string will not be empty.​
Computers and Technology
1 answer:
QveST [7]3 years ago
7 0

Answer:

The method in Java is as follows:

public static String returnlen(String input){

   String output = ""+input.charAt(0)+input.charAt(input.length()-1);

   return output;

}

Explanation:

This defines the method

public static String returnlen(String input){

This concatenates the first and the last character of the input string

   String output = ""+input.charAt(0)+input.charAt(input.length()-1);

This returns the concatenated string

   return output;

}

You might be interested in
For an alternative to the String class, and so that you can change a String's contents, you can use_________ .
mr_godi [17]

Answer:

c. StringBuilder

Explanation:

An alternative to the String class would be the StringBuilder Class. This class uses Strings as objects and allows you to mix and match different strings as well as adding, removing, implementing,  and modifying strings themselves as though they were similar to an array. Unlike the string class StringBuilder allows you to modify and work with a combination of strings in the same piece of data as opposed to having various objects and copying pieces which would take up more memory.

7 0
4 years ago
Which Cisco network security tool is a cloud-based service that provides alerts to network professionals about current network a
ArbitrLikvidat [17]

Answer:

Security Intelligence Operations      

Explanation:

Security Intelligence Operations    

  • It is an advanced security framework that offers the detection, assessment and prevention of risks and continuously provides clients with the maximum level of security.
  • It provides quick and efficient security to allow consumers to interact and work together and adopt new technology in a secure manner.
  • It does effective identification of malware, proactive security against loss of data and embraces new technologies to stay ahead of the new threats.
  • The three main components of Cisco Security Intelligence Operations are Cisco SensorBase, Threat Operations Center, and Dynamic updates.
  • Cisco SensorBase is the biggest vulnerability detection database that collects traffic and sensor data from an extensive network of Cisco devices and services worldwide.
  • Threat Operations Center consists of a virtual team of researchers, technicians, security analysts, engineers that collect data from SensorBase and provide actionable intelligence and realistic information to provide security against current and complex threats.
  • Dynamic updates provide real time alerts distributed automatically to monitoring devices, as well as best guidelines and other resources focused on helping customers to monitor attacks, interpret information, and eventually improve the overall security procedures of their organization.
4 0
3 years ago
Write a function SwapArrayEnds() that swaps the first and last elements of the function's array parameter. Ex: sortArray = {10,
ludmilkaskok [199]

Answer:

Replace /* Your solution goes here*/ with the following

<em>void SwapArrayEnds(int sortArray [], int lent){ </em>

<em>    int temp = sortArray[0]; </em>

<em>    sortArray[0] = sortArray[lent-1]; </em>

<em>    sortArray[lent-1] = temp; </em>

<em>} </em>

<em />

Explanation:

This defines the function SwapArrayEnds with two parameter (the array and the array length)

<em>void SwapArrayEnds(int sortArray [], int lent){ </em>

This declares an integer variable "temp" and initializes it with the first element of the array

<em>    int temp = sortArray[0]; </em>

The next two lines swap the last element with the first

<em>    sortArray[0] = sortArray[lent-1]; </em>

<em>    sortArray[lent-1] = temp; </em>

<em>} </em>

<em />

<em>See attachment for full program</em>

Download cpp
3 0
3 years ago
how do i type in bold for 63 points and brainlest if you help my next question the points double to 100 points
xeze [42]

Answer:

You type in bold by pressing ctrl+B at the same time it will allow you to type in bold .

<3

8 0
3 years ago
Read 2 more answers
Which best describes how the government sanctions technological monopolies?
stira [4]
By simply prohibiting others from entering the markets is the best example how the government sanctions technological monopolies.
This is to avoid  competitors and give the people no choice but to buy thier products
4 0
3 years ago
Read 2 more answers
Other questions:
  • _____ software is used to play, create, and modify audio and video files.
    6·1 answer
  • Let’s say you are given the task of retouching a famous model’s photograph. To what extent will you retouch the image? In your o
    12·2 answers
  • What are 5 actions that you can do to take care of your camera
    14·2 answers
  • A(n) ____ is a system designed to handle only very basic applications with an absolute minimum amount of hardware required by th
    9·1 answer
  • Modify your previous exercise to determine if the user can ride a rollercoaster. To ride the rollercoaster, you must be at least
    12·1 answer
  • Convert the following denary numbers into
    14·1 answer
  • A _________ attack is an attack on a computer system or network that causes a loss of service to users.
    15·1 answer
  • Question #4
    7·1 answer
  • Cidr simplifies how routers and other network devices need to think about the parts of an ip address, but it also allows for mor
    13·1 answer
  • Differentiate between symmetric and asymmetric encryption
    8·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!