170 Answered Questions for the topic Java

06/26/17

Need help writing a code in Java.

I am asked the following.   Write a program that determines change to be dispensed from a vending machine using the least number of coins. An item in the machine can cost between 25 cents to a... more

06/26/17

Trouble with a code segment in Java

  What's wrong with the following code segment?final double TAX_RATE = 0.08;TAX_RATE = 0.0875;   This question is confusing. When I copy this into my Java IDE, it can't compile and i'm left with... more

06/26/17

I don't understand this question. Anyone care to help?

I am asked   What are the difference among 1, 1.0, '1', and "1"?   And I don't understand the question at all. Can anyone explain to me or help me with this question? This question pertains to... more

04/13/17

can someone please answer my question about java script pig layin loop ?

input: nouf chapter//startsystem.out.println("Enter a list of words ending in ' .':");String word=input.next()String... more

12/10/16

Write a Java program that prompts the user to enter a number and prints all the positive integer powers of 2 less than or equal that number.

Do not use the method Math.pow() in your solution.E.g., if the user enters 9, the output should be:2 to the power 0 = 12 to the power 1 = 22 to the power 2 = 42 to the power 3 = 8

08/10/16

java programming

2. A DNA sequence in FASTA format consists of a header line starting with a “>” sign, followed by a sequence identifier (GenBank Accession number, or clone name), and one or more lines of the... more

04/11/16

How to find the length of element at any index of array in java?

Please I really need an answer. I know how to find length of array but if I need to find the length of particular element at any index of array,then?

12/04/15

How do I display the a string a random amount of time and print it out?

I am writing the Nim game program and my teacher wants me to be able to display "Pile 1: @@@@" and other piles as well. The thing is that, the "@" symbol needs to be produced a random amount of... more

11/10/15

Is better to have PHP certification and JAVA certification. I am a PHP programmer now..

I am PHP programmer for 5 years.. i would like to jump in JAVA world. so i thought to write Java cerfication first level. but people advise me to have first PHP certification. Is better to have... more

09/20/15

Java Programming

I need to write a program that accepts one command line argument, the name of a file containing data to be drawn as a pie chart, and draws the pie chart in a window.• Sample data file, birds.txt,... more

08/07/15

How does a Ball object draw itself onto a panel in a different class?

A) The Ball object's image gets drawn in the containing class, not in the Ball class.B) By passing its information to the other class so that class can draw it on the panel there.C) By drawing on... more

08/07/15

Java question please help!!!

What does the thread class method start() do?   (choices) It begins an external method.It makes an operating system thread begin to run.It makes a specific internal Java thread begin running.It... more

03/27/15

Need help to finish this netbeans program?

I had a review and im stuck on this last question.I got a few but I don't know how to finish this. Any help would be appreciated. Im just trying to finish this so I can study it. So far I have... more

12/02/14

java program a mp3 catalogue

Hi! i am new to programming and especially to Java. I have been given a task o complete which is to program a mp3 catalogue. An example could be like itunes where the songs are listed and could be... more

11/14/14

How to I change a switch operation on a string to work in eclipse 1.6?

This is the code I have:   public static double monthly(String month) { switch (month) { case "01": return .5; case "07": return .5; default: return 1; } }   However, eclipse does't allow... more

05/22/14

Write a C program that compare the time required to compute the product of two 10,000 x 10,000 matrices with and without optimization for locality.

Write a C program that compare the time required to compute the product of two 10,000 x 10,000 matrices with and without optimization for locality.

05/18/14

describe how Polymorphic Variables work and how they simplify method creation. Provide several code snippets that demonstrate how the variables work and simplif

describe how Polymorphic Variables work and how they simplify method creation. Provide several code snippets that demonstrate how the variables work and simplify method creation.

04/25/14

why would this show this error? and an example on how to fix it? i keep getting five of them

expectedprice = Integer.parseInt (inputprice);   expected }   cannot resolve synbol symbol ; method parseInt location : class homeloan moths = parseInt (Input Months)   possible loss of... more

04/13/14

Help Creating Java Program Menu, Classes, and Quit function

I am creating a java program and I do not know how to put my 3 functions into it. I also need some sort of menu screen and a way to quit the program. These are my only guidelines:   • You must... more

02/27/14

Explain when you would use a while loop rather than a for loop and vice versa. Provide an example of one such instance.

Explain when you would use a while loop rather than a for loop and vice versa. Provide an example of one such instance. How are looping statements different from selection statements?
1 2 3 4 5 7

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.