493 Answered Questions for the topic Java
01/24/22
Answer the question in the description please
Assume that aList is a valid ArrayList containing the following:Wei, Marila, Anna, Neal, Rachel, Jack, AneeshWhich of the following does not remove Anna from aList?
aList.remove("Anna",...
more
Java
01/24/22
I need help with java code cant get output
I need the following output:Values: Allen Amy Bill Chris Jane John SueSo far I have:import java.util.*; public class StringSort2 { public static void main(String[] args) { Scanner input = new...
more
01/21/22
Please answer the question in the description.
Assume that aList is a valid ArrayList containing the following:Wei, Marila, Anna, Neal, Rachel, Jack, AneeshWhen the following statement executes, what does aList contain? aList.set(1,...
more
01/21/22
Answer the question below please.
Assume that aList is a valid ArrayList containing the following:Wei, Marila, Anna, Neal, Rachel, Jack, AneeshWhich of the following does not remove Anna from aList?
aList.remove("Anna",...
more
01/21/22
Answer the question in the description below please.
Assume that the following numbers belonged to an ArrayList called values:5, 23, 45, −3, 17, 18, 100Which of the following would determine how many elements are in values?
a
int numElements =...
more
01/20/22
what is the answer to the question in the description
Given the following class:import java.util.ArrayList;public class RectangleTester{ public static void main(String[ ] args) { ArrayList< Rectangle > shapes = new ArrayList<...
more
01/18/22
What is the answer to the question in the description
Assume that the following code exists inside the main method of SomeClass, and that this code compiles without errors:int result = obj.calculate(4, 3.14);where obj is an object of...
more
Java Servlet
12/29/21
Error instantiating servlet class [test.Hello]
Description The server encountered an unexpected condition that prevented it from fulfilling the request.Exception
jakarta.servlet.ServletException: Error instantiating servlet class...
more
Java Computer Programming
12/09/21
computer language
Write a java program to implement inheritance and methodoverriding for the given problem below: [20] 1. Create a class called Courier that includes the following: a. Declare the necessary member...
more
Java Computer Programming
12/09/21
computer language
Write a program that reads an integer from the user, then creates an array of integers of that length. It then fills the array with integers read from the user. a) In your program’s main class,...
more
Java Computer Programming
12/09/21
computer language
Write a Java code which gives the value of for n= 2,4, … 2^14. You can use the function Math.pow(x, y).
12/08/21
Check whether the number is divisible by the multipliers of two and the rest of integers, java multithreading
I am trying to find the largest factor of a number (except than itself) by using multipleThreads in JAVA. the template for the code is ready but I don't know what to put in the missing methods. the...
more
12/04/21
Write a Java program using decorators
Suppose you are to write a program for a Pizza Store. The store offers pizzas with two basic types: ThinCrust and Regular. Depending upon the customer demands, their pizzas may be customized by...
more
Java
12/01/21
Java finding median
How to write a program which reads three distinct integers and prints the middle median of the three numbers when the three (numbers) are in order
11/22/21
Please help with coding problem
Hello,I have a question about a java code. I have to write a program where i'll enter a String value as a variable “word”: “blahblahblah” then create a method that is called “showPairs(String...
more
11/16/21
Help needed with code
I am struggling with a Java coding problem. How can I write an application that allows a user to enter any number of student quiz scores, as integers, until the user enters 99. If the score entered...
more
11/04/21
Write a static method histogram() that takes an array a[ ] of int values...........
Write a static method histogram() that takes an array a[ ] of int values and an integer M as arguments and returns an array of length M whose ith entry is the number of times the integer i appeared...
more
Java Computer Programming
11/04/21
if Statement on two user inputs
import java.util.Scanner;
public class RunBloodData {
public static void main (String [] args){
Scanner sc = new Scanner(System.in);
System.out.println("Enter blood type of...
more
Java
11/01/21
Error in my java class NEED HELP
public class User{ private String firstName; private String lastName; private LoginCredentials loginCredentials; /** * */ public User(String firstName, String lastName) {...
more
10/26/21
BlueJ Questions
If you could write it in the format of BlueJ(Java). That would be great but if not that's ok1) Write programs with for loops that computea. The sum of all even numbers between 2 and 100...
more
Java
10/25/21
I need help with class IdLookup and its test case
interface Lookup is included at the bottom of the page
public class IdLookup implements Lookup
{
/**
* Constructor for objects of class IdLookup.
* @param newId The id to lookup.
...
more
10/24/21
Describe the difference between Selection, Bubble and Insertion Sort
Describe the difference between Selection, Bubble and Insertion Sort
10/24/21
Explore how Bubble sort works and how it is different from the insertion and selection sort.
Explore how Bubble sort works and how it is different from the insertion and selection sort.
10/15/21
Why is the answer O(N^2) for this big-o question?
For this question:Approximate the runtime of the following code fragment, in terms of n: Write your answer in a format such as "O(N^2)" or "O(N log N)".int sum = 0;for (int i = 1; i <= n; i++)...
more
10/15/21
Is my thought process for a big-o question correct?
For this question:Approximate the runtime of the following code fragment, in terms of n: Write you answers in a format such as O(N^2) or O(N log N):int sum = 0;for (int i = 1; i <= n; i++) { ...
more
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.