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
sleet_krkn [62]
3 years ago
12

Write a static boolean method named beginsWithZ. It should accept a String object as a parameter. It should return true if the f

irst character in the String is either of two characters: a capital ‘Z’, or a lowercase ‘z’. (Note: Check the parameter for a null value, and for an empty string. Nulls and empty strings do not start with an ‘z’.)
Computers and Technology
1 answer:
almond37 [142]3 years ago
6 0

Answer:

public static boolean beginsWithZ(String word){

if(string == null || string.length() == 0)

return 0;

if(word.charAt(0) == 'Z' || word.charAt(0) == 'z')

return 1;

else

return 0;

}

Explanation:

This method is a boolean method, meaning it returns true if the string begins with Z or z and false otherwise. So:

The Java command charAt() let's you find the character at each position of the string, so i use it.

public static boolean beginsWithZ(String word){

if(string == null || string.length() == 0)

return 0;

if(word.charAt(0) == 'Z' || word.charAt(0) == 'z')

return 1;

else

return 0;

}

You might be interested in
Draw the final structure that will house the electronic system​
Natasha_Volkova [10]

Answer:

1. TECHNOLOGY GRADE 9 TERM 3. In this chapter, you will revise the work you did on electrical systems and control

Explanation:Circuits can be found in just about every electronic device you ... An electric circuit is in many ways similar to your circulatory system

4 0
3 years ago
A production house needs an operating system that captures, saves, and generates information within a specific time. Which type
bearhunter [10]
Windows and linux are best in my opinion! Linux is not used by many people but a lot of apps can't be used for linux so best is to use windows. But Mac is not bad too. Hope I helped and have a nice day!
4 0
3 years ago
Which is the best practice for placing graphics on a slide?
lbvjy [14]
All the choices depend on the slide and the last one is a must. the first one should be for the introduction and conclusion and the second one should be used to make ideas conveyed in the presentation easier to understand.
5 0
3 years ago
Read 2 more answers
Sending the same messages to a large number of users is called​
Firlakuza [10]

Answer:

Can you give me the options

3 0
3 years ago
What is the hexadecimal equivalent for 11000101?
Makovka662 [10]

Answer: C5₁₆ ⇔ 11000101₂ ⇔ 197⏨

Explanation: 11000101 is a binary number

it's equivalent decimal number is

1x2⁷+ 1x2⁶+0x2⁵ + 0x2⁴+0x2³+1x2²+0x2¹+1x2⁰ = 128+64+4+1 = 197

Hexadecimal system has equivalents in decimal system

0 ⇔0

1 ⇔ 1

2 ⇔ 2

3 ⇔ 3

4 ⇔ 4

5 ⇔ 5

6 ⇔ 6

7 ⇔ 7

8 ⇔ 8

9 ⇔ 9

10 ⇔A

11 ⇔B

12 ⇔C

13 ⇔D

14 ⇔E

15 ⇔F

197 ⇔??

To convert this decimal number in a hexadecimal number we have to divide it by 16

197/16

12,...

the quotient without the decimal part is multiplied by 16 and subtracted from the number

12x16 = 192

197-192 = 5

Then this number can be expressed as 12x16¹ + 5x16⁰ = 192 + 5 = 197

But in the hexadecimal system there are not digits > 9 , so 12 ⇔ C

197⏨ = Cx16¹ + 5x16⁰ = C5₁₆

Answer: C5₁₆ ⇔ 11000101₂ ⇔ 197⏨

\textit{\textbf{Spymore}}

8 0
3 years ago
Other questions:
  • What is the range of the well-known ports used by tcp and udp?
    5·1 answer
  • When saving a memo you created in Word, which of the following extensions is automatically assigned to the document?
    8·2 answers
  • The "fathers of the internet" are vinton cerf and ________.
    9·1 answer
  • To complete a forensic disk analysis and examination, you need to create a ____.
    12·1 answer
  • Anyone got the edmentum computer programming post test answers?
    6·1 answer
  • PLEASE HELP ASAP!!
    11·1 answer
  • Write a program that extracts the last three items in the list sports and assigns it to the variable last. Make sure to write yo
    8·1 answer
  • 1.What is a keyboard layout.
    5·1 answer
  • Write a method for the Invitation class that accepts a parameter and uses it to update the address for the event.
    9·1 answer
  • How would a barcode reader be used in a healthcare industry?​
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!