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
Most presentation programs allow you to save presentations so they can be viewed online by saving them as ____
Elza [17]

Explanation:

Most presentation programs allow you to save presentations so they can be viewed online by saving them as html

files.

5 0
3 years ago
Read 2 more answers
What is a life cycle
pochemuha

the definition of a life cycle is  the series of changes in the life of an organism, including reproduction

let me know if I helped <em>@OfficalOliviaB.</em>

4 0
3 years ago
Read 2 more answers
Which format is best for the image below?
fredd [130]
I’m pretty sure it’s PNG
3 0
3 years ago
What are the home row keys?
kramer
ASDF JKL; are the home row keys.
7 0
3 years ago
Live preview is available on a touch screen T/F
TEA [102]
<span>It is false that live preview is available on a touch screen. Life preview refers to cameras mostly, and to the fact that its display screen can be used as a viewfinder. Viewfinder is what you look through when you are using a camera to take a photo, or to focus on something. So, no, touch screen devices do not have this feature available, only the "old-school" cameras do.</span>
3 0
3 years ago
Other questions:
  • What effects will the different types of lighting produce on mountains?
    15·1 answer
  • You can access decorative underlines and change their color through the ____ drop-down.
    8·1 answer
  • What is the f(n) runtime of the following pseudocode: sum-0 for A = N/2 downto 1 for B-1 t increment sum by B Explain: exactly w
    13·1 answer
  • What financial behaviors will typically lead to a low credit score?
    14·1 answer
  • What was one complication caused by the tsunami that struck japan in 2011?
    15·1 answer
  • What video game has made the most money as of 2016?
    15·2 answers
  • I wanna start answering questions for people, but I don't quite know how. Can you help me?​
    13·1 answer
  • Which of the following sentences use personification 
    9·1 answer
  • Write a function check_palindrome that takes a string as an input and within that function determines whether the input string i
    12·1 answer
  • if we intend to include a servo motor as an actuator, what feature should we include when selecting a microcontroller?
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!