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
TiliK225 [7]
3 years ago
11

In Java :

Computers and Technology
1 answer:
Natali5045456 [20]3 years ago
5 0

Answer:

The code to this question can be given as:

Code:

//define code.

//conditional statements.

   if (Character.isLetter(passCode.charAt(0))) //if block

   {

       System.out.println("Alphabetic at 0"); //print message.

   }

   if (Character.isLetter(passCode.charAt(1))) //if block

   {

       System.out.println("Alphabetic at 1"); //print message.

   }

Explanation:

In this code, we define conditional statement and we use two if blocks. In both if blocks we use isLetter() function and charAt() function. The isLetter() function checks the inserted value is letter or not inside this function we use charAt() function that checks inserted value index 1 and 2 is the character or not.

  • In first if block we pass the user input value and check the condition that if the inserted value is a character and its index is 0 so, it will print Alphabetic at 0.
  • In second if block we pass the user input value and check the condition that if the inserted value is a character and its index is 1 so, it will print Alphabetic at 1.
You might be interested in
Explain why the cosmic horizon is much smaller than the universe itself
sashaice [31]
The cosmic horizon is what your eye allows you to see, and that is only a small fragment of the universes actual size
3 0
3 years ago
Sammy's Seashore Supplies rents beach equipment such as kayaks, canoes, beach chairs, and umbrellas to tourists. Write a program
murzikaleks [220]

Answer:

// here is code in java.

import java.util.*;

// class definition

class SammysRentalPrice

{

// main method of the class

public static void main(String[] args) {

    // scanner object to read input from user

    Scanner s=new Scanner(System.in);

      // ask user to enter year

       System.out.print("Enter the rented minutes:");

       // read minutes

      int min=s.nextInt();

      // find hpurs

      int hours=min/60;

      // rest  of minutes after the hours

      min=min%60;

      // total cost

      int tot_cost=(hours*40)+(min*1);

      // print hours,minute and total cost

      System.out.println("total hours is: "+hours);

      System.out.println("total minutes is: "+min);

      System.out.println("total cost is: "+tot_cost);

     

}

}

Explanation:

Read the rented minutes of an equipment from user with the help of scanner object. Calculate the hours and then minutes from the given minutes.Calculate the cost by multiply 40 with hours and minute with 1.Add both of them, this will be the total  cost.

Output:

Enter the rented minutes:140

total hours is: 2

total minutes is: 20

total cost is: 100

7 0
3 years ago
What does it mean when your phone says system ui has stopped?
wel
It means hat the CPU is taking o much of what the phone can normally do try delete some apps or close apps your not using 
8 0
4 years ago
The blank areas around the outside edges of a document are called the _____. a. settings b. margins c. blank space d. empty spac
nevsk [136]

I think it will be B margins

7 0
3 years ago
Flash drives plug into a(n) _
Alecsey [184]
A flash drive plugs into a USB Port
7 0
3 years ago
Read 2 more answers
Other questions:
  • A computer's fqdn is pc42042.east.contoso.corp. which option in the advanced tcp/ip settings dialog box must be enabled to allow
    14·1 answer
  • Assign True to the variable is_ascending if the list numbers is in ascending order (that is, if each element of the list is grea
    6·1 answer
  • At one college, the tuition for a full-time student is $6,000 per semester. It has been announced that the tuition will increase
    12·1 answer
  • Which is the output of the formula =NOT(12+12=24) ?
    7·1 answer
  • Compare and contrast an example of an actual company that has a brick and mortar location with an actual company that does not h
    8·1 answer
  • Sequence encryption is a series of encryptions and decryptions between a number of systems, wherein each system in a network dec
    9·1 answer
  • No careers combine more than one value
    7·1 answer
  • Many interesting science-, technology-, engineering-, and math-oriented websites provide open-source data to the public. Which o
    8·1 answer
  • What is DMTS. Explain it​
    10·2 answers
  • Edhesive 6.8 lesson practice answers
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!