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
creativ13 [48]
3 years ago
6

Write java program method that takes input as non negative integers and return the number of palindrome or not a palindrome

Computers and Technology
1 answer:
son4ous [18]3 years ago
8 0

Will this help you? Not sure if you ask that your program can take multiple numbers and test each for palindrome, but surely you will need a function like below:


public static boolean isPalindrome(int n) {

String s = Integer.toString(n);

for(int i=0; i<s.length()/2; i++) {

if (s.charAt(i) != s.charAt(s.length()-i-1)) {

return false;

}

}

return true;

}

You might be interested in
How secure is a password protected word document?
tensa zangetsu [6.8K]
Secure enough to keep someone out who get on your pc but you should encrypted it so no one o the pc or remotely access it with out a password or with out decrypting it
8 0
4 years ago
Give an original idea for an app idea to do with sports, please.
BlackZzzverrR [31]
Maden Mobile is an app for sports :)
5 0
4 years ago
If Mary makes homemade jams that she sells to her local grocer, she is practicing:
DIA [1.3K]

Answer: c) C2B (Consumer to business)

Explanation: Consumer to business (C2B) is the business technique in which the consumer or customer generates the good or service and then businesses are offered to take that product or service. The case mentioned in the question is also similar where May sells the jams made by her to the local grocer who has his business.

Other options are incorrect because Business to business (B2B) is where two business party trade with each other, Business to consumer (B2C) is business offer the product or service to consumer and Costumer to costumer(C2C) is the private trading of service between two individual parties. Thus,the correct option is option(c).

8 0
3 years ago
How do you strike through text in excel?
Valentin [98]
In the font options there is a checkbox for strikethrough. Same dialog as word, only there is no button in the ribbon for it. You could customize that by creating a custom group if you want to.
6 0
4 years ago
What is the output of this program? Assume the user enters 3, 6, and 11.
erica [24]

Answer:

14.0

Explanation:

3 0
1 year ago
Other questions:
  • What is difference between RAM and ROM?
    13·1 answer
  • Let's say you want to insert a photo of the Microsoft PowerPoint Ribbon to put into your presentation. Which of these should you
    6·1 answer
  • Make a program (C++). Sum of a 4 digits number and eliminating last digitsȘ
    13·1 answer
  • 4. Write an appropriate comment for describ-
    11·1 answer
  • Write two scnr.nextInt statements to get input values into birthMonth and birthYear. Then write a statement to output the month,
    10·1 answer
  • Send the memes whoever is the best will get that crown thing lol
    10·2 answers
  • kieran wants to search a database quickly for information on the last time a patient came to his medical facility.The informatio
    14·2 answers
  • In dynamic programming, the technique of storing the previously calculated values is called A. Saving value property B. Storing
    7·1 answer
  • How computer network reduce the cost of computer hardware? explain with example.​
    12·2 answers
  • 2. Define a function squareArea that computes the area of a square given side length
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!