32,204 Topics
| |
hi all i am making a weather data program and i having a problem for bringinng my text file to the table. here i am putting all my code . and i also have to import a second output window for my code. for example when ever i enter ome … | |
public int evaluate() { if (root == null) { return -100000; } return evaluateHelper(root); (error) } private int evaluateHelper(MyBinaryTreeNode rt) { if (rt.left == null) { return Integer.parseInt(rt.data.toString()); (error) } switch (rt.data.toString()) { case "+": return evaluateHelper(rt.left) + evaluateHelper(rt.right); case "-": return evaluateHelper(rt.left) - evaluateHelper(rt.right); case "/": return evaluateHelper(rt.left) / … | |
Hi to all! I have SQL Server Express, SQL Server Management Studio 2012. My PC Name is : "SaboorPC" and SQL Server instance name is also "SaboorPC". I am trying to connect my Netbeans to My SQL Server but it is not connecting and giving the following error: "com.microsoft.sqlserver.jdbc.SQLServerException: The … | |
***java*** i have a assignment of oop by using java can any body help me pz : Design and implement these four classes Employee, MonthlySalEmployee, HourlySalEmployee, Company and implement the following functions: ⦁ Create an application class with N HourlySalaryEmployee objects and N MonthlySalEmployee objects. ⦁ Create constructors, accessor and … | |
I am working on a reservation app in Java and it is almost complete but I keep getting this error when running my app: Exception in thread "main" java.util.NoSuchElementException: No line found at java.base/java.util.Scanner.nextLine(Scanner.java:1651) at ReservationCalculator.main(ReservationCalculator.java:34) Full Code import java.time.LocalDate; import java.time.format.DateTimeFormatter; import java.time.format.FormatStyle; import java.util.Scanner; public class ReservationCalculator { … | |
While coding a random program about how Convenient the program was for the user , I use Scanner, and its .nextInt(); to ask the user to rate the program's Convenience: 275.Scanner scan = new Scanner(System.in); 276.System.out.println("Rate the convenience of this program by typing 1 to 5..."); 277.System.out.println("1. *"); 278.System.out.println("2. * … | |
hey, i'd like to know if there is a java program that transformate 2D dicom images to 3D dicom images? | |
`import java.util.*; import java.time.*; public class Customer import java.util.*; import java.time.*; public class Customer{ private String name; private int custID; static int nextCustID = 100; ArrayList<Rent> rents = new ArrayList<Rent>(); public Customer(String n){ name = n; custID = nextCustID++; } public void addRent(int copyNo, LocalDate date, int days){ Rent r … | |
hi i want some change in this code. let one writer, one reader at the same time. Writer has preference. package test; import java.util.concurrent.Semaphore; class ReaderWritersProblem { static Semaphore readLock = new Semaphore(1); static Semaphore writeLock = new Semaphore(1); volatile static int readCount = 0; static class Read implements Runnable … | |
Hi all, Can anyone help me implement push pop instruction and call recall function in the wombat one program. Im a newbie to these things so it will be helpful if anyone could just take me step by step on what to do. many thanks. | |
Hi can anyone help me convert these codes into java and let me know which classes are to have? // Clustering.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include <string.h> #include "MersenneTwister.h" #define CATAGORICAL_CONST 30.0 #define MAX_FILENAME_SIZE 500 #define MAX_BUFFER_SIZE 500 #define MAX_STRING_SIZE 100 #define … | |
I'm using android studio to create a multiple choice question app, and i've coded the quiz but so far it just goes on forever. I want to make it so that once the user has answered 20 questions, whether they are right or wrong, the game ends and sends them … | |
Hi guys, I seem to have an issue with a boolean method returining a value. Here is the code excerpt - irrelevant code omitted: public class StreamsTest { public static void main(String[] args) { String[] arr = new String[]{"a", "b", "c"}; //convert array to string with streams List<String> list = … | |
Just a quick question, I'm trying to speed up my app and I've seen forum posts where people say reducing the size of pictures speeds up their app. I was hoping to replace my exit cross in the top corner of my app (which is a png because I drew … | |
//With this method, I input a string and return an array that contains a sorted list of characters as per the frequency. Eg: If i input "apple", the out put should be p,a,l,e, How do I do this? public static ArrayList<Character> characterFreqDist(String statement) { char[] Array = statement.toCharArray(); int length … | |
Need Help! Here's the first production worker. Exception in thread "main" java.lang.IllegalArgumentException: Multiple decimal separators in pattern "#.##0.00" at java.text.DecimalFormat.applyPattern(DecimalFormat.java:2519) at java.text.DecimalFormat.<init>(DecimalFormat.java:416) at ProductionWorker.toString(ProductionWorker.java:42) at java.lang.String.valueOf(String.java:2826) at java.io.PrintStream.println(PrintStream.java:771) at WorkerDemo.main(WorkerDemo.java:10) Java Result: 1 BUILD SUCCESSFUL (total time: 8 seconds) // Employee Class public class Employee { private String name; private … | |
/** This code is supposed to take the user input of the length and breadth of the room in one class, get the user input of the material and cost from the other class and calculate the total cost.*/ import java.util.Scanner; //My first class class RoomFlooring { private String FloorMaterial; … | |
import java.util.Scanner; class Room_Dimension { private double length; private double width; public Room_Dimension(double length, double width) { this.length = length; this.width = width; } public void setLength(double length) { this.length = length; } public void setWidth(double width) { this.width = width; } public double getLength() { return length; } public … | |
Hi, how do I sort the string in alphabetical order? find most occuring character("blablabla") remove most occuring("aaa") input: blablabla output: "aaa" | |
I have a small application written using javascript (NodeJS). How can I run it as an executable file? | |
Hey!!!!I'm looking for the perl to java conversion!!!! Can Someone please help me with the snippet!!!! As soon as possible!! Its very important!!!! my @hosts = get_hosts_ips_bymkt(); for(my $i = 0; $i < scalar(@hosts); $i = $i + 1){ my $ssh_true = eval { Net::SSH::Perl->new($hosts[$i]) }; // # $success = … | |
A palindrome is a phrase that reads the same forwards as it does backwards. For example, “a man, a plan, a canal, Panama,” is a palindrome. Write a program that uses a stack data structure to check for palindromes in each line of a text file. Test your program on … | |
Hi guys so I was playing with some code which would determine the whether a string is a palindrome or not. Its been a mixed bag of results with some palindromes being detected while others aren't. I do apologize to the lack of polish of my comments but I hope … | |
Hi everyone! i'm new to binary trees, and i wanted to write a method to find out how many nodes have bigger values than an integer n!! Any help would be appreciated :) ishi xx | |
I have an assignment doing a constructor that accelerates and brakes the speed of the car (among other non-troublesome things) but when I run the program, the speed stays constant and spits out whatever the original number is rather than raising and lowering by 5 like I want it to. … | |
Hi everyone, I'd like to ask you all to help me with this two questions and I've been faced recently, 1.What would be the algorithm which takes the pointers of two Binary Search Trees roots, if equal returns true if not FALSE. (both BSTs are the same as well as … | |
hello. I need some help in java 1.The program browse the filename of the text file to be counted 2.The contents of the file will be stored to a temporary storage. 3.Identifies if the c source code in a form of text file is physical lines of code, blank lines … | |
Does anyone know about robovm??? It is a platform to make ios apps in java. I need it for a new project I´m working on in a nearshore outsourcing company. | |
In Java, is it possible to have Interface in Inner class? | |
I am testing my Library class and the addItem method is not adding an item to the arraylist import java.util.ArrayList; public class Library { /** * itemList contains the List of all items in the library. */ private ArrayList<Item> itemList = new ArrayList<Item>(); Item item = new Item(); // Empty … |
The End.