YOOO CAN ANYONE SOLVE THIS IN JAVA??

YOOO CAN ANYONE SOLVE THIS IN JAVA??

Answers

Answer 1

public class JavaApplication80 {

   public static String swapLetters(String word){

       char prevC = '_';

       String newWord = "";

       int count = 0;

       if (word.length() % 2 == 1 || word.isBlank()){

           return word;

       }

       else{

           for (int i = 0; i<word.length(); i++){

               char c = word.charAt(i);

               if(count % 2 == 1){

                   newWord  += (c +""+ prevC);

               }

               prevC = c;

               count+=1;

               

           }

       }

       return newWord;

   }

   public static void main(String[] args) {

       System.out.println(swapLetters("peanut"));

   }

   

}

This works for me. Best of luck.

Answer 2

Answer:

I do not know

Explanation:


Related Questions

Task 2: Typing a School Speech
You have been given the responsibility of writing a speech about your school in the school's
annual event. Write a short speech (500 words) that talks about your school's legacy,
strengths, and achievements.
Type your response here:

Answers

This is my school put you can change it up:

It has elementary and high school divisions. Wister Elementary School is a public school located in Wister, OK. It has 333 students in grades PK, K-8 with a student-teacher ratio of 14 to 1. According to state test scores, 14% of students are at least proficient in math and 23% in reading.

select the correct text in the passage. Which statements indicate inductive reasoning?

1. Tanya is an engineer.

2. She lives with her grandma.

3. All engineers work in the computer application field.

4. So, Tanya also works in a software company.

5. In the evening, she listens to music to relax.

Answers

Answer:

i think 4.so tanya also works in a software company.

Your answer is option number 3

you are splitting up all your apples equally between 3 people. which statement below will calculate how many apples will be left over ?

a. var leftOver = numApples / 3;


b. var leftOver = 3/ numApples;


c. var leftOver = numApples % 3



d. var leftOver = 3% numApples


Answers

Answer:

The correct answer is:

c. var leftOver = numApples % 3

Explanation:

JavaScript uses different operators to perform various mathematical functions. In mathematics, when a number is not completely divisible by other the answer contains the remainder and quotient.

Modulus operator is used in JavaScript to find the remainder.

For example,

20/3 will return the quotient which is 6 while

20%3 will return the remainder which is 2

In the given statement, we have to find the number of remaining apples after being divided into three people

So,

Number of apples mod 3 will give us the number of remaining apples.

Hence,

The correct answer is:

c. var leftOver = numApples % 3

What is the output of this program? Assume the user enters 2, 5, 1, and 6.

numA = 0
for count in range(4):
answer = input ("Enter a number: ")
fltAnswer = float(answer)
numA = numA + fltAnswer
print (numA)

Answers

Answer:

14.0

Explanation:

The loop converts each answer to a float. The accumulator variable adds the values entered.  

2.0 + 5.0 + 1.0 + 6.0 = 14.0

Answer:

14.0

Explanation:

Edge 2021

4.8 code practice question 1 edhesive

Answers

Answer:

for x in range(5,76,5):

   print(x, end=" ")

Explanation:

Hope this helps lovely :)

4.8 code practice question 1 adhesive for x in range(5,76,5): print(x, end="").

What is adhesive?

Adhesive is defined as anything that has the ability to functionally hold materials together through surface adhesion that resists separation. PCs and laptops have numerous adhesive applications, primarily for joining electric components. In the construction of laptops, cyanoacrylates, acrylics, epoxies, UV curables, and hybrid adhesives are all utilized.

Code is defined as the collection of rules or instructions that are written in a specific programming language. In general, programming statements written by a programmer using a text editor or visual programming tool and then saved in a file are referred to as source code.

Thus, 4.8 code practice question 1 adhesive for x in range(5,76,5): print(x, end="").

To learn more about adhesive, refer to the link below:

https://brainly.com/question/29061431

#SPJ3

what is an hard ware ? ​

Answers

Explanation:

tools, machinery, and other durable equipment.

tractor in reverse brainliest answer

Answers

Answer:

Valtra

Explanation:

It is the only tractor that goes in reverse.

Thank you so much!

Have a good day

Hope this helped,

Kavitha Banarjee

* 9) Which is a function of an operating system?
Provide user interface
Protect against malware
Edit images
Browse the internet

Answers

Answer:

Provide user interface

Explanation:

In the input mask format (999) 000-0000, what do the 9s represent?
o any number, letter, or symbol
any number or letter
required numbers
optional numbers
The answer is D

Answers

It is either C or, as you said, D.

         The standard American telephone number is ten digits, such as (555) 555-1234. The first three digits are the "area code," which, in the past, indicated in what part of the country the phone was located.

        The regular American telephone number has 10 digits, such as (999) 000-0000. The nines, or 3 digits, are the area code of the phone.

        They are required numbers that are based off of where the phone is, the area code.

The 9s in the input mask format is : ( B ) Any number or letter

The American telephone number format  

The 9s in the number represent the area code from which a caller/phone is registered and this could be any number or letter, the american telephone format consists of 10 digits in which the first three is the area code which ic mostly any number or letter.

Hence we can conclude that The 9s in the input mask format is : ( B ) Any number or letter.

Learn more about American telephone number format :  https://brainly.com/question/13076983

#SPJ2

Which ribbon tab is used to locate the Backstage view and to configure the global Outlook options?
O Home
O Folder
O View
O File

Answers

The file tab helps with locating the backstage view

Answer:

File

Explanation:

I hope this helps! :)

Which of the following are runtime exceptions? Select all that apply.

Select one or more:
a. NullPointerException
b. IllegalArgumentException
c. ArithmeticException
d. IndexOutOfBoundsException

Answers

Answer:

a. NullPointerException

Explanation:

In Computer programming, some examples of runtime exceptions are:

A. NullPointerException

B. IllegalArgumentException

What are runtime exceptions?

Runtime exceptions can be defined as the parent class (superclass) in all exceptions of the Java programming language that has the ability to crash a software program when they occur.

In Java programming language, some examples of runtime exceptions include the following:

IllegalArgumentExceptionDateTimeParseException MissingResourceExceptionNullPointerException

Read more on runtime exceptions here: https://brainly.com/question/3620278

#SPJ9

Select the correct answer. Which application is a digital version of a manual typewriter? A. database B. presentation C. spreadsheet D. word processor

Answers

Answer:

Word Processor

hope i helped :D

Answer:

(D)- word processor

Explanation:

got it right

I'm not sure how to do these. By the way, it has to be python.

Answers

Task 1:

float75 = float(75)

string75 = "75"

# you cannot add together a number and a string because a string has no inherent numerical value like a number does.

Task 2:

num = float(input("Enter a number"))

print(num**2)

Task 3:

num = int(input("Enter an integer: "))

print("When you divide "+str(num)+" by 7, the quotient is "+str(num//7)+" and the remainder is "+str(num%7)+".")

Task 4:

gigs = int(input("How many gigabytes does your flashdrive hold? "))

print("A flashdrive with "+str(gigs)+ " gigabyte(s) holds "+str(gigs*8589934592)+" bit(s).")

For task 4, you might have to change the number 8589934592 to something else. I'm not entirely sure how many bits are in a gigabyte. I hope this helps though.

difference between a software and a hardware​

Answers

Answer:

soft... intangible hard.... tangible

Which of the following is true of functions?

A: Replacing repeated code with a function will reduce the number of commands the computer needs to run
B: Functions are called once but can be declared many times

C: Programs written with functions run more quickly

D: Functions can help remove repeated code from a program

Answers

Answer:

the answer is D

Explanation:

What is the output of the following program?

numA = 1
for count in range(3,5):
numA = numA * count
print(numA)
Output: ____

Answers

I don't know if the print statement is indented into the for loop.

If the print statement is indented like this:

numA = 1

for count in range(3,5):

   numA = numA * count

   print(numA)

The output will be:

3

12

if the print statement is indented like this:

numA = 1

for count in range(3,5):

   numA = numA * count

print(numA)

The output will be:

12

I hope this helps!

Based on the scenario above , the  output of the following program written is 12.

What is computer output?

An output is known to be a kind of data that a computer often brings out.

The loop goes from 3 to 5. therefore, Based on the scenario above , the  output of the following program written is 12.

Learn more about output from

https://brainly.com/question/11451813

#SPJ2

Do all careers or professions need computer science? Why or why not?

Answers

Answer:

Most careers or professions need computer science

Explanation:

As humanity is improving technological wise most jobs will be replaced and other jobs would come into play and in order for individuals to become employed in jobs that will be available in the future to come they will have to have a degree in computer science or know how to operate computers.

Answer:

No not all careers and professions require computer science

Explanation:

There are so many careers, many in which you may not sit in front of a computer. If you become a farmer, janitor, teacher or more you may not need computer science skills.

Take two String inputs of the same length and merge these by taking one character from each String (starting with the first entered) and alternating. If the Strings are not the same length, the program should print "error".

Sample Run 1:

Enter Strings:
balloon
atrophy
baatlrloopohny
Sample Run 2:

Enter Strings:
terrible
mistake
error

Answers

Answer:

Written in Python

print("Enter strings: ")

str1 = input()

str2 = input()

if len(str1) == len(str2):

     for i in range(0,len(str1)):

           print(str1[i]+str2[i], end='')

else:

     print("Error")

Explanation:

Prompts user for two strings

print("Enter strings: ")

The next two lines get the input strings

str1 = input()

str2 = input()

The following if condition checks if length of both strings are the same

if len(str1) == len(str2):

If yes, this iterates through both strings

     for i in range(0,len(str1)):

This prints the the characters of both strings, one character at a time

           print(str1[i]+str2[i], end='')

If their lengths are not equal, the else condition is executed

else:

     print("Error")

import java.util.Scanner;

public class JavaApplication89 {

   

   public static void main(String[] args) {

       Scanner scan = new Scanner(System.in);

       System.out.println("Enter Strings:");

       String word1 = scan.nextLine();

       String word2 = scan.nextLine();

       String newWord = "";

       if (word1.length() != word2.length()){

           newWord = "error";

       }

       else{

           for(int i = 0; i < word1.length(); i++){

               newWord += word1.charAt(i)+""+word2.charAt(i);

           }

       }

       System.out.println(newWord);

   }

   

}

This is the java solution. I hope this helps!

What game is this?????????????????????

Answers

Sonic the hedgehog

Hope this helps you broski

What is the main difference between a fileserver and network attached storage (NAS)?

Group of answer choices


NAS provides more services.


A fileserver is more customizable.


A fileserver is less customizable.


A fileserver is better for smaller companies.

Answers

Answer:a filserver is better for smaller companies

Explanation:

Hope this helps :)

Answer:

A fileserver is more customizable

Explanation:

Drag each label to the correct location on the image.
Match the different types of mounting techniques with their definitions.
uses triangular pockets
to hold the corners of a
photograph to the mount
board
uses wet glue to stick
the print to a mount
board
uses a heat-activated
adhesive to permanently
stick the photograph to
a rigid backing board
uses different patterns
of tape to create hinges,
which attach the print to
a mount board
dry mount
photo corners

Answers

Answer: uses a heat activated.... the answer is dry mount

Use triangular pockets to hold the corners....the answer is photo corners

Use different patterns of tape.....hinge mount

Uses wet glue to stick the print....wet mount

Explanation: I got this right on a post test

The matchup of the mounting techniques are:

uses a heat activated-  dry mountUse triangular pockets to hold the corners-  photo corners Use different patterns of tape-h/in/ge mountUses wet glue to stick the print- wet mount

What is the mounting techniques

Mounting could be a handle by which a computer's working framework makes records and registries on a capacity gadget (such as difficult drive, CD-ROM, or organize share) accessible for clients to get to through the computer's record system.

There are diverse sorts of strategies in mounting craftsmanship work, exhibition hall mounting and dry mounting. Gallery mounting is authentic and reversible and dry mounting is authentic (in most cases) and non-reversible.

Read more about mounting techniques here:

https://brainly.com/question/20258766

rolulzoss
A. State three positive uses of computers in the government sector​

Answers

Answer:

1) it's easier to keep documents

4. What is an example of a Trans receiver? *
A. Pager
B. Wi-Fi
C. Telephone

Answers

I really think it A : pager
I hope this helps !!

Free 35 points!!!

I'm attempting to create a game on Khan Academy using the computer coding courses, but I can't find how to program a moving background or enemies, can someone please give me pointers/suggestions?

P.S. I'm trying to make a Galaga-like game (2-Dimensional) , and it has to be in JavaScript Processing code.

Answers

Answer:

free points?? why does it have question then

Explanation:

Answer:

Well I dont use Khan Academy sorry

Explanation:

There are many reasons to convert to the decimal numbering system. Select the best answer. When checking numeric values in computer memory, decimal makes sense because you use decimal numbering every day. When checking words in computer memory, decimal makes sense because you use decimal numbering every day. When comparing values in a computer program, decimal numbering makes sense because it is always shorter than hexadecimal. When checking words in computer memory, decimal numbering makes sense because it is easier than hexadecimal.

Answers

Answer:

first statement makes most sense.

Explanation:

When checking numeric values in computer memory, decimal makes sense because you use decimal numbering every day. --> sounds OK.

When checking words in computer memory, decimal makes sense because you use decimal numbering every day.  --> doesn't make sense

When comparing values in a computer program, decimal numbering makes sense because it is always shorter than hexadecimal. --> Not true

When checking words in computer memory, decimal numbering makes sense because it is easier than hexadecimal. --> Hexadecimal would be easier when inspecting computer words, because you can easily see the byte alignment of the values.

Answer:

the first statement

Explanation:

got it right on edge

if you could repeat the lab and make it better, what would you do differently and why? lab report:heredity and punnet square

Answers

Answer: Mendel's studies constitute an outstanding example of good scientific technique. ... The gardener or experimenter can cross (cross-pollinate) any two pea plants at will. The anthers from one plant are removed before they have opened to shed ... (or individuals) represent different forms that the character

A Von Neumann model for a computer system has a central processing unit (CPU) that makes
use of registers.Identify three registers that may be used​

Answers

Answer:

1. Calculation unit

2. control unit

3. storage

Explanation:

Which sign or symbol will you use to lock cells for absolute cell reference?
A.
ampersand
B.
asterisk
C.
dollar sign
D.
exclamation mark

Answers

Answer:

Option C. dollar sign is the correct answer

Explanation:

There are two types of referencing styles used in MS excel.

Relative and absolute.

Out of these two, absolute referencing is used where we don't want the cell addresses to change when the formula with cell reference is copied. Dollar sign is with the row and column number to write an absolute cell reference.

An absolute cell reference for cell C5 is written as:

$C$5

Hence,

Option C. dollar sign is the correct answer

Answer:

C. dollar sign

Explanation:

untern
1.
What is interne
2.
3.
What is URL? Explain the component of URL.

Answers

Answer:

The answer to this question is given below in the explanation section.

Explanation:

The questions are what is the internet and what is URL? and explain the component of the URL.

Internet:

Internet is a network of computers to send data and communicate with each other, such as an example of the post office, that sends letters from one place to others places. Such as, the internet is the network of computers that communicate with each other while sending digital data in small packets.

URL:

URL is a uniform resource locator that locates an existing resource over the internet. For example, when you want to search for something over the internet, you will put the address of that resource in your browser address bar. Or when you directly search using a search engine, the search engine provides you in return to your quarry a list of search-related links. When you click the link and link open in your browser address bar. That link is a URL.

A URL normally has three or four components such as Scheme, Host, Path, and, a Query String.

Scheme: The scheme identifies the protocol to access the resource over the internet such as HTTPS (with SSL) and HTTP (without SSL).

Host: A host identifies the host-name that holds the resource, for example, www. abc.com, in it abc is a host.

Path: It identifies the specific resource in the host that the web client or browser wants to access. For example, /course/topics/first-topic/index.html.

Query string: A query string is a string that is appended in the URL that stores the information about the resource hold.

HTTP is made to facilitate which kind of communication?

computer to computer
IT Support to User
computer to user
user to computer

Answers

Answer:

Computer to computer.

Explanation:

HTTP facilitates the connection between websites, so the answer is computer to computer.

Other Questions
PLEASE HELP ME 50 POINTS!!!!Identify an expression that is equivalent to 0.3(15y). anyone go to k12 online school? Which type of reaction is NaCl + AgNO3 NaNO3 + AgCl? A. synthesisB. decompositionC. oxidationD. replacement passenger move backward when bus at rest starts to move suddenly give reason 4 pounds of sugar can make 8 batches of candy corn. How many pounds of sugar are needed if we want to make 12 batches of candy corn? Kavi raskhan Pathar ke roop Mein Kiska Ansh Banna Chahte Hain What ancient Greek value do the figures on the vase most likely represent? glory loyalty wisdom hospitality when divided by 8 i am 70 when divided by 7 i am 80 what are the benefit of following social rules for an individual and the society Which diagram shows possible angle measures of a triangle? Kiana earns $32,000 salary at the start of her career (term 0). Each year, she gets a 5% raise. HELP PLEASE!!!!! 100 POINTS!!!!!What is the main idea of this excerpt from Abraham Lincolns First Inaugural Address?Apprehension seems to exist among the people of the Southern States that by the accession of a Republican administration their property and their peace and personal security are to be endangered. There has never been any reasonable cause for such apprehension. Indeed, the most ample evidence to the contrary has all the while existed and been open to their inspection. It is found in nearly all the published speeches of him who now addresses you. I do but quote from one of those speeches when I declare that "I have no purpose, directly or indirectly, to interfere with the institution of slavery in the States where it exists. I believe I have no lawful right to do so, and I have no inclination to do so." Those who nominated and elected me did so with full knowledge that I had made this and many similar declarations, and had never recanted them.A. The Southern states openly flouted and defied the laws of the Constitution of the United States.B. The Southern states were threatened by Lincolns fondness for the Northern states.C. The Southern states authority was dwarfed by the emerging Northern states of the Union.D. The Southern states handled their personal affairs of state in an immoral and unethical way.E. The Southern states had no reason to worry for their personal freedom and well being. Which of the following themes or concepts does Clarisse mainly represent?Answer choices for the above questionA. oppressionB. happinessC. nonconformityD. angercorrect anwsers only A popular dance club allows 29 customers to enter per hour. The club has to keep their occupancy below 600 at any time during the day. Currently, the club has 339 customers. If none of the customers leave, how many more hours, x, can the club continue to accept new customers?Select the number line that includes the largest number of hours the club can continue to accept new customers without exceeding their occupancy. Which of these is an opinion?ASome dancers were asked to determine if sets of music were human or computermade.BA sonnet is known to have 14 lines and follow a certain rhyme scheme.Only a thoughtful person can come up with a meaningful poem.DA Dartmouth music professor helped plan a poetry competition. Can you plz help me with this question ? What is the value of n in the equation { (2n + 4) + 6 = -9 +4(2n+1)?n =N= 1 1. Which of the following terms describe the diction of the paragraph? Circle all thatapply.help with 1 and 2 pls The tax rate as a percent, r, charged on an item can be determined using the formula StartFraction c Over p EndFraction minus 1 equals r. 1 = r, where c is the final cost of the item and p is the price of the item before tax. Louise rewrites the equation to solve for the final cost of the item: c = p(1 + ). What is the final cost of a $40 item after an 8% tax is applied? $ What changes should be made in OSI model(Open System Interconnection).