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
Which spreadsheet feature could the scholarship committee use to locate applicants who meet the criteria?
Radda [10]

Answer:

H8

Explanation:

4 0
3 years ago
You're researching information about titanium bike frames. Which Web site is probably the least biased? The web site of a nation
Alexxx [7]
The website of a National Bike Museum would give you information about all different kinds of bikes. 

A local Bike shop would likely be biased to try to get you to buy from them. 

Answer) The website of a National Bike Museum 
5 0
3 years ago
The transitions between slides in a presentation are one type of powerpoint ____.
slava [35]
The transitions between slides in a presentation are one of type of power point 
Animation.
Animation is a set of effects which can be applied to objects in power point  so that they will animate in the slideshow power point.motion paths allow objects to move around the slide show.
4 0
3 years ago
Which of these protections covers creative works such as books and artwork?
Oduvanchick [21]
The answer is D copyright
6 0
3 years ago
Help me to find the answer
gulaghasi [49]
I know this is a long time ago but did u ever figure out the answer?

6 0
3 years ago
Other questions:
  • What will be displayed after the following statements have been executed? int x = 15, y = 26, z = 32; x = x + 12; y = y/6; z -=
    15·1 answer
  • Who would use a magnetic hard drive? Give a scenario and include examples as well as detail.
    5·1 answer
  • What does phishing mean?
    9·2 answers
  • Who can pick up GPS signals
    14·1 answer
  • Who was the inventor of the iPhone?
    13·2 answers
  • An example of negative self-talk is:
    13·2 answers
  • During his last performance review, Franco's boss urged him to set some short-term and long-term sales goals to help him perform
    6·2 answers
  • Can someone help me calculate this Multimedia math:
    11·1 answer
  • What is the output?
    7·2 answers
  • Which of the following statements are true about mobile app development? Select 3 options.
    8·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!