Study the following
// The Works of Wolfgang
public class Wolfgang
{
public static void main(String[] args)
{
System.out.print(“The works of Wolfgang\ninclude ”);
System.out.print(“the following”);
System.out.print(“\nThe Turkish March ”);
System.out.print(“and Symphony No. 40 ”);
System.out.println(“in G minor.”);
}
}
Want to see the full answer?
Check out a sample textbook solutionChapter 2 Solutions
Starting Out with Java: From Control Structures through Data Structures (4th Edition) (What's New in Computer Science)
Additional Engineering Textbook Solutions
Java: An Introduction to Problem Solving and Programming (7th Edition)
Java: An Introduction to Problem Solving and Programming (8th Edition)
Starting Out With Visual Basic (8th Edition)
C Programming Language
Java How to Program, Early Objects (11th Edition) (Deitel: How to Program)
Introduction to Java Programming and Data Structures, Comprehensive Version (11th Edition)
- public class Test { } public static void main(String[] args){ int a = 10; System.out.println(a*a--); }arrow_forwardpublic static class Lab2{public static void Main(){int idNum;double payRate, hours, grossPay;string firstName, lastName;// prompt the user to enter employee's first nameConsole.Write("Enter employee's first name => ");firstName = Console.ReadLine();// prompt the user to enter employee's last nameConsole.Write("Enter employee's last name => ");lastName = Console.ReadLine()// prompt the user to enter a six digit employee numberConsole.Write("Enter a six digit employee's ID => ");idNum = Convert.ToInt32(Console.ReadLine());// prompt the user to enter the number of hours employeeworkedConsole.Write("Enter the number of hours employee worked =>");// prompt the user to enter the employee's hourly pay rateconsole.Write("Enter employee's hourly pay rate: ");payRate = Convert.ToDouble(Console.ReadLine());// calculate gross paygrossPay = hours * payRate;// output resultsConsole.WriteLine("Employee {0} {1}, (ID: {2}) earned {3}",firstName, lastName, idNum,…arrow_forwarduse javaarrow_forward
- public static void printIt(int value) { if(value 0) { } System.out.println("Play a paladin"); System.out.println("Play a white mage"); }else { } }else if (value < 15) { System.out.println("Play a black mage"); System.out.println("Play a monk"); } else { public static void main(String[] args) { printit (5); printit (10); printit (15); Play a black mage Play a white mage (nothing/they are all printed) Play a paladin Play a monkarrow_forwardQuestion public class MyProgram { if (h 18) { public static void main(String[] args) { int h=10, t-22; System.out.print ("Good "); } } else } } What is the output displayed by the following lines of code?" System.out.print ("Morning"); t = t + 2; if (t > 30) System.out.println(" Every one!"); System.out.println("The Your answer system.out.print("Evening"); t = t + 5; temperature is " System.out.println(" Brink water?"); Degree.");arrow_forwardpublic class MyOutput { public static void main(String[] args) { int totalNumbers=6; Double dblAverage=4.5; Integer yourNumber= new Integer (20); int result=yourNumber+88; String myMessage="Exam"; System.out.println(totalNumbers+dblAverage+myMessage+result); }arrow_forward
- class Variables { public static void main(String[] args) { .arrow_forward// Some circle statistics public class DebugFour2 { publicstaticvoidmain(Stringargs[]) { double radius =12.6; System.out.println("Circle statistics"); double area = java.Math.PI * radius * radius; System.out.println("area is " + area); double diameter =2- radius; System.out.println("diameter is + diameter); } }arrow_forwardclass class { public static void main(String args[]) { int a =5; int b =10; first: { second: { third: { if(a == b >>1) break second; } System.out.println(a); } System.out.println(b); } } } Give result for the code Java Try to do ASAParrow_forward
- // This program assigns values to two variables // and performs mathematical operations with them public class DebugFour1 { public static void main(String args[]) { int x = 5; int y = 8; int z = 19; System.out.println("adding " + x + y); System.out.println("subtracting " + y - z); System.out.println("dividing " + z / x); System.out.println("multiplying " + x / z); } }arrow_forwardPROBLEM STATEMENT: An anagram is a word that has been rearranged from another word, check tosee if the second word is a rearrangement of the first word. public class AnagramComputation{public static boolean solution(String word1, String word2){// ↓↓↓↓ your code goes here ↓↓↓↓return true;}} Can you help me with this java question the language is java please use the code I gavearrow_forwardJava: ShowStudent.java: class ShowStudent { public static void main (String args[]) { Student pupil = new Student(); pupil.setIdNumber(234); pupil.setPoints(47); pupil.setHours(15); pupil.showIdNumber(); pupil.showPoints(); pupil.showHours(); System.out.println("The grade point average is " + pupil.getGradePoint()); } } ShowStudent2.java: class ShowStudent2 { public static void main (String args[]) { Student pupil = new Student(); pupil.showIdNumber(); pupil.showPoints(); pupil.showHours(); System.out.println("The grade point average is " + pupil.getGradePoint()); } } Student.java: class Student { // the private data members private int idNumber; private int hours; private int points; // Constructor added in part c Student() { } // end of constructor added in part c // the public get and set methods public void…arrow_forward
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education