Which of the following is not a java keyword? Select one: O a. else O b. goto О с. if O d. name O e. None of these Which of the following is not a Java comment? Select one: O a. Declaration Comments O b. Single Line Comments O. Multi-Line Comments O d. Documentation Comments O e. None of these Which of the following is a valid identifier? Select one: O a. public O b. None of these O c. static O d. name е. true
Q: make a simple java program that can calculate the amount of calories in a food
A: Editable source code:import java.awt.*; import java.awt.event.*; import javax.swing.*; import…
Q: write a Java program calculating the tax owed be these ceos.
A: The program is implemented in java language. The code is implemented below:
Q: A method with name calcMin to calculate and return the shortest time taken to travel from home to…
A: A Java program is given below, File name: “studentTravel.java” import java.util.*; public class…
Q: Which of the following is a java documentation generator? O a. Javadoc O b. JRE O c javac O d. jar
A: A java document generator tool is used for generating standard documentation in the form of HTML…
Q: background. Write code to play and stop the music in ba
A: I want to play music in the background. Write code to play and stop the music in background…
Q: A method with name calcAvg to calculate and return the average time taken travelling from home to…
A: A Java program is given below, File name: “studentTravel.java” import java.util.*; public class…
Q: /rite the Java code: 1. Prompt the user for the length and the width of a rectangle in inches 2.…
A: Program : import java.util.Scanner;class Main{ public static void main(String args[]) {…
Q: What is the ending value of y? int x; int y; x = 2; y = ((x + 1) / 5) + (x / 2) ; a. 1…
A: Coded using Java.
Q: java program that will ask the weight (kg) and height (cm) of the user, the program will calculate…
A: The names of the controls on the frame are shown in the following diagram:
Q: Which of the following is a true statement? Examples of utilities include word processors,…
A: Introduction: An application (program), application program, or application programming is a PC…
Q: I need help making a java code. Write a program that prompts the user to enter a social security…
A: Am attaching the correct code in the next step(full working code) :
Q: Write an application that will take a 5 digits integer from user and calculate the sum of all digits…
A: Below is the required code in C language. Program approach: Include necessary header files to get…
Q: What will be the output of the following Java code? public class A { void A() {…
A: Program: //Defining class A public class A { //Defining member function A() void A() {…
Q: Which of the following statements is correct? Utilities include things like word processors,…
A: The Answer:
Q: What is floating-point literal? Select one: O a. All of these O b. It could be double or float…
A: Here, we are given 3 MCQs and i have provided answers for all 3 questions. Questions are related to…
Q: FOR ALL PARTS, MAKE SURE YOUR METHODS ARE STATIC ❏ PART 1: String Manipulation ❏ Create a String…
A: public class LibraryPractice { public static void main(String[] args) { //part 1…
Q: am having a lot of errors pop up, and I need the pattern to follow the instructions below. Please…
A: Program Approach: 1- Import all the necessary packages as per the requirements.2- Prompt a message…
Q: Which of the following is a FALSE statement? O High level languages are easy to understand O Python…
A: An equivalent program in a high-level language can be less efficient and use more memory. so third…
Q: What is the value of num after executing the following Java statements? int num = 2; double i = 1;…
A: Refer to step 2 for the answer.
Q: The output of the snippet of code shown below?bool(‘False’) bool() a. True True b.…
A: In option A, both examples are given as true. In the first example, the boolean function returns…
Q: help debug my Java program? here are the errors I’m getting. line 86: syntax error on token “)”,…
A: The errors in the given java program can be removed as follows: The statement at line 86 has to be…
Q: output the unabbreviated form, else output: Unknown. Support two abbreviations: LOL -- laughing out…
A: Here is program code : import java.util.Scanner; public class TextMsgAbbreviation { public static…
Q: Select all the values that are taken as false in Javascript: O a. 0.0 O b. w O c. "undefined" O d.…
A: Given:
Q: Which among the following is a java documentation generator? O a. jre O b. javadoc О с jar d. javac
A: Question 1
Q: his? JAVA. Comment everything out. Prompt the user for input, and use a Scanner object to read the…
A: We need to read the latitude and longitude of both points and display the result as per the given…
Q: What is the output of the following java code? Scanner input = new Scamer("15 10"); String sum =…
A: Task :- Choose the correct option for given question.
Q: Create a java program called Guess that prompts the user to enter a number. The number entered is…
A: PROGRAM: //Importing scanner class import java.util.Scanner; //Defining the class Guess class Guess{…
Q: Describe how you would create a Java program that prompted the user to correctly enter a username…
A: Actually, java is a object oriented programming language. It is a platform independent.
Q: which of the following is not a correct Java statement to declare and initialize a int variable x ?…
A: The incorrect statement to declare and initialize a int variable x is: d) int x = 1.4
Q: Which of the following a valid Java identifier? Select one: Оа. id O b. id O c. $id O d. All of…
A: Java identifiers are used for the identification purpose, the valid java identifiers contains…
Q: Describe how you would create a Java program that prompted the user to correctly enter a username…
A: import java.util.*; import java.lang.*; public class Test{ public static void main(String args[]){…
Q: Which one of the following statements is true? Word processors, spreadsheets, e-mail clients, web…
A: Introduction: An application (app), application program, or application software is a computer…
Q: ite a java code for a user who forgots his password and want to reset the password ask the user to…
A: java program is as given below :
Q: ?Which of the following is used to write multi-line comments in Java */ /* O /**/ // ?/
A: Answer :
Q: How to change the output numbers in the red box to 5 and -3 (without the decimal point)?
A: Required: Java code. How to change the output numbers in the red box to 5 and -3 (without the…
Q: Which case of the following throws an ArithmeticException in Java ? O a. Multiply a number by Zero O…
A: Correct Option: b. Divide a number by Zero
Q: this computer JAVA program that is supposed to give you 3 attempts to insert a password and when you…
A: I have given java code without an error below.
Q: Which of the following is not true of using a IDE to develop Java programs? a. It’s easier to…
A: 1) IDE(Integrated Development Environment) increase programmer productivity, Below aspects of IDE…
Q: o code what's
A:
Q: Which of the following of statement/s is/are false? * I. All white-space characters (blanks) are…
A: Wrong option true option is below step
Q: Which of the following will evaluate to true? I. True AND False II. False or True III. False AND…
A: AND Truth Value table- A B A and B True True True True False False False True False…
Q: 1. Which of the following is an invalid variable name? a) abc b) _a bc c) abc_1 d) float wwwn 2.…
A: 1. There are four options given, we have to find the right word which is not allowed to declare as a…
Q: his is a debugging question I am stuck on - The files provided in the code editor to the right…
A: Introduction of the Program: The Java Program takes Floor Plans as input from the user and displays…
Q: Create a java program 3. Security Check Woah there, what are you doing roaming around past the…
A: Objective: This program requests the user to enter the number that should be considered as the age.…
Q: I need help making a java code. Write a program that prompts the user to enter a social security…
A: Java: Java is a class based, high level object oriented programming language. Java is developed by…
Q: Which method should be used to input a long line of text including spaces? a nextDouble b…
A: option (B) is correct option
Q: Which one of a, b, c, d correct? During the writing of a program, you are confronted with a coding…
A: Which one of a, b, c, d correct? During the writing of a program, you are confronted with a coding…
Q: Which of the following is not a valid variable declaration in Java? Select one: O a. int x = 1; O b.…
A: Note: This is a multiple-question-based problem. As per company guidelines, only the first question…
Q: Create a Java program that will let the user choose between organisers and volunteers. Then let them…
A: A class is the fundamental unit of object oriented modelling. A class contains data and operations…
Q: Create a method in java that takes a value and indicates whether it is positive or negative by a…
A: Algorithm: Start Implement a method check() which takes a number as argument and return true if…
Java
Trending now
This is a popular solution!
Step by step
Solved in 4 steps
- Create a Java program that declares and initializes the following variables: an integer variable named "num" with a value of 10 a double variable named "price" with a value of 19.99 a boolean variable named "flag" with a value of true a String variable named "name" with a value of "John Doe" Output the values of these variables to the console using the System.out.println()which of the following words are legal variable names in C++, and which are not? And why? x1 EvilDarkness PennslyvaniaAve1600 1600PennsylvaniaAve Bobby_the_Robot Bobby+the+Robot whatThe??? amount count2 count2five 5count main main2I need to create a java program that validates passwords entered into it. The password entered must match the specific pattern using a single regex statement. It must follow the exact order of 1 or more upper case letters, two lower case letters, 1 or 2 digits, zero or 1 upper case letters and any 2 of these symbols @#$%^& The output should say "Please enter a password:" If the password is wrong then it should say "Please try again. The password should have 1 or more upper case letters, two lower case letters, 1 or 2 digits, zero or 1 upper case letter and 2 symbols @#$%^&." If the password matches everything then it should say "Your password matches the pattern needed." If it's valid, it should end the loop. If it's invalid, it should continue to loop until it's valid.
- a) Write a Java statement that declares a variable to hold a student's exam score. b). Write a Java statement that declares a variable to hold a student's GPA. c). Write a Java statement that declares a variable to hold a student's exam score 89 d). Write a Java statement that declares a variable to hold a student GPA 3.5 Answer:1- Please I want answer of this question with typing codes and Screenshot. Thanks Write a Java Program with the followingWhich of the following will evaluate to true? I. True AND False II. False or True III. False AND (True or False) a. I and II b. II and III c. II d. I python 3
- Which of the following statements is NOT equivalent to the statement, "There exists either a computer scientist or a mathematician who knows both discrete math and Java."a. There exists a person who is a computer scientist and who knows both discrete math and Java or there exists a person who is a mathematician and who knows both discrete math and Java.b. There exists a person who is a computer scientist and who knows both discrete math and Java or there exists a mathematician who knows both discrete math and Java.c. There exists a person who is a computer scientist or there exists a person who is a mathematician who knows discrete math or who knows Java. d. There exists a computer scientist who knows both discrete math and Java or there exists a person who is a mathematician who knows both discrete math and Java. e. There exists a person who is a computer scientist or a mathematician who knows both discrete math and Java.Then create a new Java application called "IncomeTax" (without the quotation marks) that prompts a user for his or her marital status (single or married) and annual income (a double value), and then uses nested if statements to compute that person's tax, based on the simplified tax-rate table below. Be sure to provide suitable data entry prompts for the marital status. Format any currency output to appear as a leading "$" and two decimal positions (e.g. $1,200.00, $67,000.00). Also, update the output example's currency values to include "," for currency amounts. Output of your program should look close to the following and should be constructed using both String literals and variables for income, tax rate, and income tax. Note the requirement for this program to use nested if statements. This requirement is intended to help you build some logic with good formatting. Use comments to help readers understand your code.*USING JAVA* Now, follow the instructions below to create a new program named AriannasAppliances that will ask the user to enter the quarterly sales revenues for each of five appliance types sold by AriannasAppliances. It will then compute the annual sales revenues for each appliance type, total annual sales revenues for the company, and the percentage of the total sales revenues for each appliance type. Open Eclipse. Create a New -> Java project. Name it Chap4-AriannasAppliances and click Finish and OK. Next, create a New -> Class. Name it AriannasAppliances and be sure to check the first checkbox under "Which method stubs would you like to create?" and click Finish. Delete the green comment text in the file "AriannasAppliances.java" Add a comment at the top // (your name) Add another comment at the top // Project 4 Add code to the file "AriannasAppliances.java" to create a program that will do the following: use a for-loop to ask the user to enter the quarterly…
- i am a beginner to java can you plz make the code look that i just started and not use advanced code Convert these statements into Java code Store 119.5 in a variable named weight. Store 3 in a variable factor. Divide weight by factor and store in variable ans. Display the contents of the ans variable. iam a beginner to java can you plz make the code look that i just started and not use advanced codeI need help making a java code. Write a program that prompts the user to enter a social security number in the format DDD-DD-DDDD, where D is a digit. The program should check if the input is valid. If the program isn't valid I need to provide 1 of 3 feedback. 1"You entered an invalid social security number." 20%" 2 "Can't you follow directions? 40%" 3. "You are not very smart are you?" 40% I need 1 to come 20% of the time, and 2 and 3 40% I need random number gen used to select the response.I need help making a java code. Write a program that prompts the user to enter a social security number in the format DDD-DD-DDDD, where D is a digit. The program should check if the input is valid. If the program isn't valid I need to provide 1 of 3 feedback. 1"You entered an invalid social security number." 20%" 2 "Can't you follow directions? 40%" 3. "You are not very smart are you?" 40% I need 1 to come 20% of the time, and 2 and 3 40% I need random number gen used to select the response. I keep getting an error saying java: reached end of file while parsing import java.util.Scanner; public class security_number { public static void main (String [] args) { Scanner in= new Scanner (System.in); System.out.print("Enter social security number:"); String s= in.nextLine(); boolean isValid = (s.length==11) && ( Character.isDigit(s.charAt(0))) && (Character.isDigit(s.charAt(1))) && (Character.isDigit(s.charAt(2))) && (s.charAt(3)== '-' ) &&…