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
madam [21]
3 years ago
15

Suppose you have an int variable called number. What Java expression produces the second-to-last digit of the number (the 10s pl

ace)?
What expression produces the third-to-last digit of the number (the 100s place)?
(Note: Our code checker won't match every possible expression; please come up with the simplest expression using division and modulus.)
10s place
100s place
Computers and Technology
1 answer:
kobusy [5.1K]3 years ago
4 0

Answer:

int second_to_last = (number/10)%10;

int third_to_last = (number/100)%10;

Explanation:

The first expression int second_to_last = (number/10)%10; first divide the number by ten and then get modulus by dividing by ten again which will then give the second to last digit.

Assuming number is 146 the second to last digit will be 4.

for the second expression int third_to_last = (number/100)%10; first divide the number by hundred and then get modulus by dividing by ten which will then give the third to last digit.

Assuming number is 4368 the third to last digit will be 3.

You might be interested in
3. What of the following is the main components of computer system?
Likurg_2 [28]

Answer:

CPU, input unit, Output unit, memory unit

3 0
2 years ago
Read 2 more answers
An instance variable name of type String, initialized to the empty String. An instance variable score of type int, initialized t
timofeeve [1]

Answer:

public class Class {

   private String name ="";

   private int score = 0;

   //Method SetName

   public void setName(String newName){

       name = newName;

   }

//Method SetScore

   public void setScore(int newScore){

       score = newScore;

   }

//Method GetName

   public String getName() {

       return name;

   }

//Method GetScore

   public int getScore() {

       return score;

   }

}

Explanation:

  • The class called Class is implemented in Java programming language
  • It has two fields (instance variables name and score)
  • Methods for setting the values of variables (mutator methods) or setters
  • Methods for getting the values of the variables (accessor methods) getters
8 0
3 years ago
How do Brainly experts and verified users format their answers to look like this:
koban [17]

{ \dashrightarrow{ \green{ \tt{use \: the \: latex}}}} \\  \\  { \blue{ \sf{ \: refer \: to \: the \: pdf \: available}}} \\ { \blue{ \sf{at \: https : \  \:  \ \: latex \: on \: brainly}}}

3 0
2 years ago
Read 2 more answers
17.
Radda [10]
Sorry to answer you so late but that would be truth because that is the first rule of science which is what thermodynamics depends in. 

The first law of thermodynamics is a type of law of conservation but with thermodynamics systems. 


So, in gogle I found this: "The law of conservation of energy states that the total energy of an isolated system is constant; energy can be transformed from one form to another, but cannot be created or destroyed."

Like I said, sorry to reply so late but I hope this helped! =)
3 0
2 years ago
Martha is a network monitoring technician working on a firewall for her company’s network. To filter traffic going through the f
tia_tia [17]

Answer:

D

Explanation:

Not much of a tech person, but protocol then firewall seems the most reasonable.

7 0
3 years ago
Read 2 more answers
Other questions:
  • HELP NOW PLZZ/ Question: Complete the sentence with the correct response.
    11·1 answer
  • Given the security levels TOP SECRET, SECRET, CONFIDENTIAL, and UNCLASSIFIED (ordered from highest to lowest), and the categorie
    13·1 answer
  • 2. Suppose you want to write a method that prints a heading on a new output page, along with a page number that is 1 in the firs
    15·1 answer
  • Implement a java program to find the smallest distance between two neighbouring numbers in an array.
    7·1 answer
  • What is a set of javascript statements that result in an action?
    15·1 answer
  • Sometimes news organizations have biasis because
    5·1 answer
  • What allows you to heal<br><br><br><br> undesirable portions of an image​
    9·1 answer
  • SUMMING THE TRIPLES OF THE EVEN INTEGERS FROM 2 THROUGH 10) Starting with a list containing 1 through 10, use filter, map and su
    7·1 answer
  • Software that displays advertising material when online.
    12·2 answers
  • Can someone reply me
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!