493 Answered Questions for the topic Java

Can somebody please fix the output of date in this code

package filestatistics2;import java.io.File;import java.util.*;import java.text.*;public class FileStatistics2{ private static Object f; public static void main(String[] args) { ... more

Create two files using any word – processing program or text editor. Write an application that determines whether the two files are located in the same folder. Save the files as SameFolder.java

Can anyone please finish this I have a hard time doing it PLEASEpackage samefolder;import java.util.*;import java.text.*;import java.io.*;import java.io.File; public class SameFolder { private... more

heres a cs question

Consider the following code segment, which is intended to find the average of two positive integers, x and y.int x;int y;int sum = x + y;double average = (double) (sum / 2);Which of the following... more

How to make these 4 classes with these information?(java)

Class1 (Person)-name: String-address:StringMethods:+Person(name: String, address : String)+getName():Stringg+getAddress():String+setAddress (address: String) : void+toString():String ---->"name... more
Java

10/06/20

leap year methods

A common year in the modern Gregorian calendar consists of 365 days. In reality, the earth takes longer to rotate around the sun. To account for the difference in time, every 4 years, a leap year... more
Java

10/06/20

Acronyms acronyms

An acronym is a word formed from the initial letters of words in a set phrase. Write a program whose input is a phrase and whose output is an acronym of the input. If a word begins with a lower... more
Java

10/06/20

Count characters - methods

Write a program whose input is a character and a string, and whose output indicates the number of times the character appears in the string.Ex: If the input is:n Mondaythe output is:1Ex: If the... more
Java

10/03/20

Solve the question

Problem: Johnny realized that there are many developers out there who will be pleased if there is a data structure that can store paired-data of int and String (this is what they call key-value... more

10/01/20

Java help with coding

Program that prompts the user for the lengths of the sides of a triangle andcomputes the three angles and area. Assume that the user always enters positive integers. Tocompute the angles, use the... more

09/29/20

java month calendar with days in month ad first sunday input

Write a program that produces a calendar. Your program should output acalendar for a single month, given parameters to specify how many daysin the month and the day of the first Sunday.

How to make a class called time on java with these data informaton:

■Class Time■-second:int = 0 ----> hour:[o, 23]--minute:int = 0 ----> minute: [o, 59]-hour: int=0 -----> second: [e, 59]Methods:-+Time()+Time (second: int, minute: int, hour: int)+getHour):... more

09/22/20

pseudocode in java

Write pseudocode for a recursive method that will calculate the expected value of a decision tree, assuming that all decisions are made by maximizing the expected utility. Your method should return... more

Computer Science - Graphs

I've been given an adjacency matrix and asked to state whether the corresponding graph is undirected or not.How do we say whether a graph is undirected or not simply looking at its adjacency matrix.

Java Messenger Application

Problem Description: Distributed banking application You are required to build an application for Bank of Fiji. The application will allow users to create a bank account and use deposit and... more

09/14/20

java programming

a) Write a method that takes as input a 2-dimensional matrix representing the joint probability distribution over two variables, and returns the marginal probability distribution for either the... more

Whats the answer for these Classes and Objects exercise?(Java)

Question 1: Create a class Circle with data types (radius, colors) and methods getRadius (0, getArea().Question 2: Create a class Car with data types (plateNumber, xLocation, yLocation, speed) and... more

09/11/20

object oriented programming

Draw a class diagram on MS Visio having following scenario and attach screen shot of it,It’s an app in which TeleLogin is a class in which SignIn and SignUp are it subclasses, having... more
Java

09/06/20

Johhny did the method overriding of mA() method in class B as shown below. What exactly did he do wrong?

public class A {public double mA() {// code}}public class B extends A {public int mA() {// code}}
Java

09/05/20

Johhny did the method overriding of mA() method in class B as shown below. What exactly did he do wrong?

public class A {public double mA() {// code}}public abstract class B extends A {public abstract double mA();}
Java

09/05/20

Johhny did the method overriding of mA() method in class B as shown below. What exactly did he do wrong?

public class A {public double mA() {// code}}public class B extends A {private double mA() {// code}}
Java

09/05/20

Can I have help with this problem?

Predict what will be printed out on console, if you run class 'Test' below?public class Test {public static void main(){String[] a){A ref = new B();ref.mP();}}protected int f = 1;public void... more
Java

08/23/20

I need help solving this problem.

Develop a method that will transfer data from an one-dimensional array to athree dimensional array in the reverse order as show below:public void reverseTransfer(int[ ] a, int[ ][ ] b){// complete... more
Java

08/23/20

Please help with this question as I am struggling.

Initialize, while creating, a two-dimensional array that will hold the following setof data in its elements.
Java

08/23/20

Can you help me with this question?

Develop a method that will transfer data from an one-dimensional array to athree dimensional array in the reverse order as show below:public void reverseTransfer(int[ ] a, int[ ][ ] b){// complete... more

08/09/20

What do you know about USACO?

I have no coding background. I don't know where to start studying for USACO?Which programming language is the best for USACO?

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.