493 Answered Questions for the topic Java

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
Java C

04/23/16

Convert MIPS Assembly language to C or Java

Consider the following loop. loop: lw r1, 0(r1) and r1, r1, r2 lw r1, 0(r1) lw r1, 0(r1) beq r1, r0, loop Rewrite the above assembly code back to C or Java code
Java

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?

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
Java

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

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

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

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
Java Javafx Gui

03/08/15

Write a Javafx program that displayss the color of a circle as black when the mouse is pressed and as white when the mouse button is released

Need to write a Javafx program that ..... (Change color using a mouse) Write a program that displays the color of a circle as black when the mouse button is pressed and as white when the mouse... more

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

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

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.
Java

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.

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

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

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?

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.