answer.
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
soldier1979 [14.2K]
2 years ago
8

Consider the method total below: public static int total (int result, int a, int b) {     if (a == 0)    {      if (b == 0)     

 {         return result * 2;      }      return result / 2;       }    else    {      return result * 3;    } }           The assignment statement x = total (6, 0, 0); must result in
x being assigned the value 8

2) 
x being assigned the value 4

3) 
x being assigned the value 5

4) 
x being assigned the value 12

5) 
x being assigned the value 10




Consider the following definitions:
public boolean someMethod (int[] list, int value)
{
   int counter;
   boolean flag = false;
   for (counter = 0; counter < list.length; counter++)
   {
     flag = (list[counter] != value);
   }
   return flag;
}
Under which of the following conditions must the method above return true?

1) 
Under all conditions

2) 
Under the condition that value == list[list.length − 1]

3) 
Under the condition that value != list[list.length − 1]

4) 
Under the condition that value != list[i] for all i such that 0 <= i < list.length

5) 
Under no conditions




What is the output of the program shown below? (1 point)
public class SomeClass
{
   private int x, y;
       public SomeClass (int xValue, int yValue)
   {
     x = xValue;
     y = yValue;
   }            
   public void m1()
   {
     x = 30;
     System.out.print((y + 1) + " ");
   }
   public void m2()
   {
     m1();
     System.out.print(x + " ");
   }
}
public class SomeTester
{
   public static void main (String[] args)
   {
     int x = 20;
     int y = 10;
     SomeClass z = new SomeClass(x, y);
     z.m2();
     z.m1();
   }
}



21 10 21

2) 
21 30 21

3) 
11 30 11

4) 
1 10 11

5) 
11 30 21




​
Computers and Technology
1 answer:
Julli [10]2 years ago
3 0

Answer:

A23 4657

Explanation:

You might be interested in
The navigation bar on the left side of ____ view contains commands to perform actions common to most office programs.
kondor19780726 [428]

Answer:

The navigation bar on the left side of File view  contains commands to perform actions common to most office programs.

Explanation:

It enable all kinds of operations such as opening a file, closing a file, saving the file, saving a file with a different name, listing recently opened document, etc.

The open option enable us to open an existing file, all the recent files will be listed in the recent option and there are no files opened newly or if the data are cleared often, then it will be empty.

A file can be opened and saved with the different name so that the recent change will be saved in the new file and there will be presence of existing file too.

4 0
2 years ago
Write a method that will receive 2 numbers as parameters and will return a string containing the pattern based on those two numb
Kipish [7]

Answer:

The purpose of the Java compiler is to translate source code into instructions  public static void main(String[] args)  Arity is the number of arguments passed to a constructor or method or the number ... and objects, which are the focus of object-based programs.  Remove the 2 from between the square brackets to make.

Explanation:

5 0
2 years ago
#Imagine you're writing a program to check if a person is
irakobra [83]

Answer:

i hope the program below will help you!

Explanation:

5 0
2 years ago
What answer best explains why improper netiquette is considered dangerous? Individuals who violate user policies are often charg
adell [148]

Answer:

Students become vulnerable to cyberbullying and harassment.

Explanation:

3 0
2 years ago
Read 2 more answers
Replace any alphabetic character with '_' in 2-character string passCode. Ex: If passCode is "9a", output is:9_Hint: Use two if
Mashcka [7]

Answer:

Following is given the code as required.

I hope it will help you!

Explanation:

7 0
2 years ago
Other questions:
  • The adjusted cell references in a copied and pasted formula are called ____ cell references.
    7·1 answer
  • To read encrypted data, the recipient must decipher it into a readable form. what is the term for this process? re-securing decr
    5·1 answer
  • A user calls the help desk and reports that the workstation, when powering up, displays error messages about an invalid system d
    8·1 answer
  • Justin signed a rental agreement for his new condo. How long is his lease? a p e x
    15·1 answer
  • Define a method named roleOf that takes the name of an actor as an argument and returns that actor's role. If the actor is not i
    8·1 answer
  • A ______________ deals with the potential for weaknesses within the existing infrastructure to be exploited.
    10·2 answers
  • Stan’s assignment is to print a three-dimensional image on a piece of paper. Which printing technique should he use?
    14·2 answers
  • Explain the history of computing of mechanical era
    14·2 answers
  • Write an application that accepts up to 20 Strings, or fewer if the user enters the terminating value ZZZ. Store each String in
    15·1 answer
  • Directions
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!