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]
2 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]2 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
When preparing the heading for an MLA Format Academic Report, which of the following shows the proper order of the for lines of
Sloan [31]

Answer:

A. Student Name, Instructor, Course, Date

Explanation:

Begin one inch from the top of the first page and flush with the left margin. Type your name, your instructor's name, the course number, and the date on separate lines, using double spaces between each. Double space once more and center the title

3 0
2 years ago
does an access control list looks for patterns of traffic between multiple packets and takes action to stop detected attacks?
Kryger [21]

The access control list searches for patterns in the communication between different packets and responds to any assaults that are found.

<h3>What is the access control list?</h3>

An access control list searches for patterns in the communication between different packets and responds to any assaults that are found.

Based on the IP header data, such as the source or destination IP address, protocol, or socket number, an access control list filters traffic.

Thus, the access control list searches for patterns in the communication between different packets and responds to any assaults that are found.

Learn more about the access control list here:

brainly.com/question/13718195

#SPJ4

5 0
1 year ago
Write a C program that will load entries from a file containing details of books and prints them.
Sladkaya [172]

Answer:

........

Explanation:

3 0
3 years ago
What is pure substance ​
nlexa [21]

Answer:

i don't know

Explanation:

I don't understand

4 0
2 years ago
What is an example of a way a farm could apply new technology to improve sustainability?
Bess [88]

An example of a way a farm could apply new technology to improve sustainability is via the use artificial intelligence to predict and adjust the farm's water usage.

<h3>How is artificial intelligence used in farming?</h3>

The use of AI systems is one that can help to make better the total harvest quality and accuracy which is known to be precision agriculture.

Note that An example of a way a farm could apply new technology to improve sustainability is via the use artificial intelligence to predict and adjust the farm's water usage.

Learn more about sustainability from

brainly.com/question/26195041

#SPJ2

4 0
1 year ago
Other questions:
  • Which of the following is considered a benefit when using slab allocator?
    6·1 answer
  • How can I collect tweets from different accounts concurrently and categorize the tweets in a corpus?
    15·1 answer
  • Project using simple formulas
    15·1 answer
  • Which type of microphone uses two metal plates?
    7·1 answer
  • write the cell address for the following 1. First row and first column 2.First column and last row. 3. 10th column and 19th row.
    5·1 answer
  • 2.<br> The force of impact is
    5·1 answer
  • What constructs break or bend the normal Syntax patterns of scheme?
    15·1 answer
  • Ew<br>subject: Computer<br>11101÷101<br> binary operations<br>​
    7·1 answer
  • There is a development team delivering a new software package with agile and devops frameworks. in one of the releases, the auto
    11·2 answers
  • Edit the program provided so that it receives a series of numbers from the user and allows the user to press the enter key to in
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!