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
Alla [95]
3 years ago
9

Output all combinations of character variables a, b, and c. If a = 'x', b = 'y', and c = 'z', then the output is: xyz xzy yxz yz

x zxy zyx Note: If outputting multiple character variables with one statement, the argument for System.out.print() should start with "" + Your code will be tested in three different programs, with a, b, c assigned with 'x', 'y', 'z', then with '#', '$', '%', then with '1', '2', '3'.
Computers and Technology
1 answer:
LekaFEV [45]3 years ago
8 0

Answer:

// package

import java.util.*;

// class definition

class Main

{

   // main method of the function

public static void main (String[] args) throws java.lang.Exception

{

   try{

       // initialize variables

       char a='x',b='y',c='z';

       // char variables with different Characters

      // char a='#',b='$',c='%';

      // char a='1',b='2',c='3';

       

       // print all the combinations

       System.out.print(""+a+b+c+" "+a+c+b+" "+b+a+c+" "+b+c+a+" "+c+a+b+" "+c+b+a);

   }catch(Exception ex){

       return;}

}

}

Explanation:

Declare and initialize variables a,b,c with "x","y","z" respectively.

Then with the help of print statement we can print all combinations

of these characters.Similarly we can check this for different input

characters.

Output:

xyz xzy yxz yzx zxy zyx

#$% #%$ $#% $%# %#$ %$#

123 132 213 231 312 321

You might be interested in
How can earn more answer from brainly less than two minutes, please
Andrei [34K]
You have to answer other people’s questions.
6 0
3 years ago
Select the correct answer.
Mekhanik [1.2K]
The best answer is A
5 0
3 years ago
Read 2 more answers
WHAT DOES THE TRANSPORT LAYER USE TO MAKE SURE THAT A MESSAGE IS REASSWMBLED CORRECTLY ON THE RECEIVING DEVICES?
mrs_skeptik [129]
The answer is  sequence  number
6 0
3 years ago
a. Fill in the blanks with suitable words: A software that controls and manages all the activities of the computer ... b. A soft
zavuch27 [327]

Explanation:

i don't know

4 0
3 years ago
A USB is used for _________.[ pick the best answer that makes sense]
Nookie1986 [14]
<span>B) storing information and documents, pictures</span>
4 0
3 years ago
Read 2 more answers
Other questions:
  • What type of attack intercepts communication between parties to steal or manipulate the data?
    13·1 answer
  • Which strategy are you using when you only read the title, section headings, and captions?
    12·2 answers
  • Hello, can you help me answer these questions?
    9·2 answers
  • True/False: When you make a function call, the order of the arguments you send does not matter as long as the number of argument
    15·1 answer
  • Application means to
    5·1 answer
  • Heres the last questions
    5·1 answer
  • The template code provided is intended to check whether an integer entered by the user is outside of the range 20-29 (inclusive)
    9·1 answer
  • Assume you are using the text's array-based queue and have just instantiated a queue of capacity 10. You enqueue 5 elements and
    13·1 answer
  • What are the routes through with Virus transmitted into computer<br>system?​
    15·1 answer
  • ...............is a personal computer that fits on desk.​
    5·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!