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
Sindrei [870]
3 years ago
6

Write a program (main method) that advises the user on programming language. So if a user for instance enters "Java" the program

might say "awesome" or if the user enters "Ruby" it might say "are you sure?" . Make the program comment on at least 5 programming languages.
Computers and Technology
1 answer:
vivado [14]3 years ago
6 0

import java.util.Scanner;

public class JavaApplication41 {

   

   public static void main(String[] args) {

       Scanner scan = new Scanner(System.in);

       String language = scan.nextLine();

       if (language.toLowerCase().equals("java")){

           System.out.println("Awesome!");

       }

       else if (language.toLowerCase().equals("python")){

           System.out.println("A very simple language!");

       }

       else if (language.toLowerCase().equals("ruby")){

           System.out.println("Are you sure?");

       }

       else if (language.toLowerCase().equals("javascript")){

           System.out.println("Easy enough");

       }

       else if (language.toLowerCase().equals("c")){

           System.out.println("Cool!");

       }

   }

   

}

I hope this helps!

You might be interested in
Fill in the code to complete the following method for checking whether a string is a palindrome. public static boolean isPalindr
Ilia_Sergeevich [38]

Answer:

(s.charAt(0) != s.charAt(s.length()-1))

Explanation:

public class Palindrome

{

public static void main(String[] args) {

   

    System.out.println(isPalindrome("car"));

    System.out.println(isPalindrome("carac"));

 

}

   public static boolean isPalindrome(String s) {

       if (s.length() <= 1)

           return true;

       else if (s.charAt(0) != s.charAt(s.length()-1))

           return false;

       else

           return isPalindrome(s.substring(1, s.length() - 1));

   }

}

You may see the whole code above with two test scenarios.

The part that needs to be filled is the base case that if the character at position 0 is not equal to the character at the last position in the string, that means the string is not a palindrome. (If this condition meets, it checks for the second and the one before the last position, and keeps checking)

4 0
4 years ago
What is the name of the personal digital assistant in apple's smart phone?
notsponge [240]
The correct answer is siri
5 0
3 years ago
Assume that name is a variable of type String that has been assigned a value. Write an expression whose value is the first chara
andrezito [222]

Answer:

name.charAt(0);

Explanation:

Given: 'name' is a variable of type String that has been assigned a value.

To determine: an expression whose value is the first character of the value of name.

Let us assume nae is assigned the value "test". So our expression should return the first character , that is 't'.

In order to do this, we can use the charAt method of String object.

String name="test";

char c = name.charAt(0);

Here 0 corresponds to the index of the character we are interested in.

3 0
3 years ago
Salesforce organizes your data into: A. Objects and records, like tabs and rows on a spreadsheet. B. Objects and fields, like co
pshichka [43]

Salesforce organizes your data into option A. Objects and records, like tabs and rows on a spreadsheet.

<h3>How does Salesforce organize data?</h3>

Salesforce is known to be a tool that helps one to put together their your into objects and records and it is said to have standard objects that has been set up and ready for use.

Hence, Salesforce organizes your data into option A. Objects and records, like tabs and rows on a spreadsheet.

Learn more about Salesforce from

brainly.com/question/7452075

#SPJ1

7 0
2 years ago
A ______ oversees the planning and implementation of sophisticated security measures to block unauthorized access but at the sam
meriva
A-database administrator
8 0
3 years ago
Other questions:
  • Which steps will complete adding the cells A45 to A55?
    8·1 answer
  • In a pie chart showing showing the voting choices of 120 voters, the blue slice of pie is half of the pie. This means of 60 vote
    12·2 answers
  • All of the following are typical characteristics of internet predators, except white. male. between the ages of 18 and 35. high
    7·1 answer
  • One vital component of your professional behavior with regard to computing systems today is the creation of​ _________.
    14·1 answer
  • Use the drop-down menus to complete statements about managing meeting responses.
    13·1 answer
  • _____ are skilled computer users who try to gain unauthorized access to other people’s computers.
    15·1 answer
  • When a module is executing what happens when the end of the module is reached?
    10·1 answer
  • Many websites (mostly online shopping sites), monitor a person’s Internet browsing behavior, such as the websites we often visit
    14·1 answer
  • In Scheme, source code is data. Every non-atomic expression is written as a Scheme list, so we can write procedures that manipul
    8·1 answer
  • Seneca has just applied conditional formatting and realizes that she has made a mistake. Which action should she take to fix the
    12·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!