36,051 Topics

Member Avatar for
Member Avatar for teekay309

A certain company wants to improve the rate at which their login system is accessed and you have been tasked to carry out this project. In this project, you will consider the problem of organizing a collection of computer user-ids and passwords. Each time a user logs in to the …

Member Avatar for JamesCherrill
-1
214
Member Avatar for mxwarning

Hello, I am having trouble with how my program displays the items with a $ sign. I do not want a dollar sign and I ma not sure how it got there as I did not put one in. Is there a way to get rid of the $ sign …

Member Avatar for mxwarning
0
123
Member Avatar for edrewc

Hello java friends, I'm new to the concept of ArrayList and I want to solve this problem in my code. my main problem: I don't know how to sort itemA and itemB to appear only once then It will just add the total prices together. this is the behavior of …

Member Avatar for zolymo
0
1K
Member Avatar for cd88

Hi, I am trying to use an exception catch properly but I am getting lost and frustrated. I've changed my code so many times and cannot figure out why when it catches the exception it will not let me continue to enter data into the array. It just displays it …

Member Avatar for JamesCherrill
0
236
Member Avatar for Victoria_1

For a homework assignment in my intro to java class I was given the following problem: Write for, do-while, and while statements to compute the following sum and product 1. 1 + 7 + 25 + 79 + .... + (3^20 - 2) 2. 1 x 3 x 9 x …

Member Avatar for stultuske
0
256
Member Avatar for humorousone

I've played a LOT of minecraft over the past few years, and this is quite a big deal for me. Personally, I can't help but feel a little bit concerned. > In a statement, Microsoft said it would maintain Minecraft across all its existing platforms, with a "commitment to nurture …

Member Avatar for DeanMSands3
0
371
Member Avatar for KetraCoder

Hi, I've recently just discovered that there is something called ByteCode in Java, and I was wondering what it is used for. I am trying to make a simple Typing Test Word Typer Bot, basically it reads the words on the browser for a typing test called 10FastFingers, then it …

Member Avatar for JamesCherrill
0
254
Member Avatar for SadiqGwarzo
Member Avatar for VinVins
Member Avatar for JamesCherrill
0
40
Member Avatar for chubbyy.putto

I trying to understand the ArrayList let say the user input in 1st Person Name : Alex Sex : M Dog Name: Java 2 Person Name: Joe Sex: M Dog Name: Is 3 Person Name: Anna Sex : F Dog Name: Fun in Arraylist how can you separate out from …

Member Avatar for zolymo
0
211
Member Avatar for zolymo

Hello. Im making an webapp using Eclipse Keppler. REQUIREMENTS: - Eclipse for Java EE (or JBoss Developer Studio 7 o 8) - JBossTools installed on eclipse - JBoss Aplication Server 7.1.1 (not eap) - MySQL connector J 5.33 Structure of project: i use this package structure - persistence and ejbdao …

0
89
Member Avatar for andruluchko

I have to make a model of this arithmetical expression using a binary tree. Expression is a+b*c-b http://piccy.info/view3/7176082/d09578d27ea7057c572de3f108a9301f/ Here's the model of my tree in Java enum NodeType { NUMBER, OPERATOR } // Possible kinds of node. class ExpNode { // A node in an expression tree. NodeType kind; // …

0
88
Member Avatar for infiniteloop56

Hi Community, I have a problem that I am trying to solve. Essentially, the run down is that Integers have a limit to the size of the number in which you can store in such a data type. To get around that I have to take a number and put …

Member Avatar for jwenting
0
122
Member Avatar for LianaN

Hi! I'd like to check if a string contains spaces: [CODE]System.out.println(text2.getText().matches("\\s+"));[/CODE] This code returns 'false' for both "My string" and "MyString". But I need 'true' for "MySpace". How could I do this? Thanks!

Member Avatar for stultuske
0
19K
Member Avatar for cemonica

Hello everyone. I am having a lot of trouble in a class, and I am wondering if I can get some input/advice with my part one inventory program. I have already submitted this assignment, but I am going to have to modify it on Wednesday. My instructor has not graded …

Member Avatar for Schol-R-LEA
0
199
Member Avatar for school12345

Using 3 different for loops, write a java program to give the following output. The program requires no user input. Save the program as ThreeLoops.java Countdown... 10 9 8 7 6 5 4 3 2 1 Blast Off! Even Counting 2 4 6 8 10 12 14 16 18 20 …

Member Avatar for Loiba
-4
159
Member Avatar for hbelle.28

Hi, I am taking my first Java class this semester, and I have run into an assignment that just has me stumped: I am to write a program that will count the number of occurrences of each letter in a string the user inputs. It is in a section discussing …

Member Avatar for stultuske
0
485
Member Avatar for jhamill

I'm trying to write a program that checks if a input string value contains any capital letters. Is there a way to do this in java?

Member Avatar for stultuske
0
3K
Member Avatar for Orgest

Hello I have write some code to read a specific word from a text file. The file is located in a specific folder. In the folder there are multiple files, i want to read first the file that is upload first in the directory. After I have read file, I …

Member Avatar for stultuske
0
255
Member Avatar for mgold

I'd like to find an algorithm book that's either meant to be or good to use as a reference. By "reference" I mean that it contains all the basic algorithms (machine-learning algorithms especially) like QuickSort, Logistical Regression, Clustering. Preferably, including both the mathimicatical definition as well as psuedo code, or …

Member Avatar for StefanijaV93
0
451
Member Avatar for larnacode

Hi there. Complete beginner on Java and OO principles. Having a little trouble in trying to figure out how to make objects move across the screen. Eventually, this will be a model of the solar system. So I have a planetObject class that represents a planet in the solar system: …

Member Avatar for larnacode
0
288
Member Avatar for Maggie_1

Hi, I'm working on this project right now which probably shouldn't be that difficult but I'm really confused and lost. The assignment's instructions are: "Write a program that uses the Monte Carlo sampling method to estimate the average number of bottles of e-Boost someone would have to drink to win …

Member Avatar for Maggie_1
0
396
Member Avatar for Kunai9292

hey, could u help me with my java programming? i have this problem: Thanks a lot!!!! The mathematician Augustus De Morgan was aged 43 in the year 1849AD. This is interesting because 43 squared is 1849, ie, in 1849 his age was the square root of the year. Given that …

Member Avatar for TylerD75
0
9K
Member Avatar for javaCONFUSEDDD

// Given that no person has ever lived longer than 123 years (and assuming that no one ever will), write a Java application that will determine if it is possible that anyone who is alive today is, has ever been, or will ever be alive in a year that is …

Member Avatar for TylerD75
0
728
Member Avatar for Fatima_110

Hi, So for an assignment i had to read input from a file and then output it. The information in the file was in the following format: 1 line with a stock symbol and the next line with the quantiti bought. eg of a file that we'd use .ab 15 …

Member Avatar for Fatima_110
0
200
Member Avatar for dothack123

So after scanning a file, I am to format it and output it following these guidelines: -Lines are trimmed to remove any leading or trailing white space. Note that String has a method trim() that removes leading/trailing white space.  A trimmed line is displayed with X leading spaces  …

Member Avatar for dothack123
0
192
Member Avatar for vivekH

Frnds, My questions is "how come to know whether the number is even or odd without using %,/,bitwise operator".

Member Avatar for vivekH
0
278
Member Avatar for kanakaraj.karre

Hi to everybody... Iam new to Webservices ..... Can anybody tell me two things ....... 1)What is the difference between the soap and rest webservices.. 2)Which one is more secure... Thanks in advance....

Member Avatar for JeffGrigg
0
72
Member Avatar for rob.sigmon.1

Modify the Inventory Program by creating a subclass of the product class that uses one additional unique feature of the product you chose (for the DVDs subclass, you could use movie title, for example). In the subclass, create a method to calculate the value of the inventory of a product …

Member Avatar for Schol-R-LEA
1
560
Member Avatar for moaz.amin.37

i have a problem in JDBC every thing is ok it shows this message `java.lang.ClassNotFoundException: sun.jdbc.odbc.JdbcOdbcDriver` i already create DSN but but it stil show this error i do not know what i do My jdk is 64 bit and i create DSN of odbc 32 bit is any problem …

0
216
Member Avatar for AbstractEden

One of my assignments, that I already turned in, dealt with collecting a student's name and gpa, and storing the information in an array. Afterwards, we were asked to display the student's information in descending order based on their gpa. I was curious if anyone has any suggestions on improving …

Member Avatar for stultuske
0
4K
Member Avatar for sam_7

I have 2d array that looks like this 0,7,0 7,3,3 8,0,3 I want to print such that the output looks like this(**in non hard-coding way**) 1st loop 0,7,0 7 8 2nd loop 0,7,0 3 0 3rd loop 0,7,0 3 3 4th loop 0 7,3,3 8 5th loop 7 7,3,3 0 …

Member Avatar for stultuske
0
170
Member Avatar for Jamie_5

I am currently developing a Simon says type game using jquery and javascript. I have linked a fully copy of the game on github Github download and unzip to see the game fully https://github.com/Jamiex304/Simon_Says_Game_Demo And I have reached a problem I want to add a timer that the player can …

0
93
Member Avatar for DawnofanewEra

I'm new to java and I'm working on a small android project using eclipse. I created a table and I want to populate it with data from a file. I have done this using EditText control shown below. public void AddRowItemTable(View view) { EditText itemid_Text= (EditText) findViewById(R.id.itemid); EditText itemname_Text=(EditText) findViewById(R.id.itemname); …

Member Avatar for stultuske
0
250
Member Avatar for funnym3

how to get the declared value from other java file and use it to another java file? like I want to show the user's real name using the textView when he/she successfuly login, from the main activity to the welcome page. example "Welcome User". I have tried this but it's …

0
204
Member Avatar for michael.james.90475

public void log (){ if(start==null) System.out.println("List is empty.."); else{ Node temp=start; System.out.print("->"); //get rid of each user with a similar method but with a random user removed.... while(temp.next!=start ) { int r = rand.nextInt(2) ; if(r==0) { deleteAt(counter); System.out.println("Is Logged Off "+temp.data); } else if(r==1) { System.out.println("Is Logged on "+temp.data); …

Member Avatar for michael.james.90475
0
258
Member Avatar for pocka.lesole

I n a fictitious country of Ruritania, which is in a fictitious continent called Afrisia, the tax system is highly simplified. T hey have system where all taxes are converted to one single value and then the tax is applied according to the following rule(s) : if a person earns …

Member Avatar for <M/>
-3
192
Member Avatar for temp_1

Hello, I'm using Netbeans with JDK 7. I'm developing a swing desktop application with embedded derby database. I'm using the following code. Statement stmt; try { Class.forName("org.apache.derby.jdbc.EmbeddedDriver"); Connection conn = DriverManager.getConnection("jdbc:derby://localhost:1527/HelloWorld", "userid", "password"); stmt = conn.createStatement(); String sql = "INSERT INTO TABLEEMP " + "VALUES (" + Integer.parseInt(jTextField1.getText()) + ", …

Member Avatar for ~s.o.s~
0
201
Member Avatar for Slavi

Hey guys, I am facing a problem with one of my homeworks, it states: The various analyses implemented in the program analysis module will make use of a number of general data structures and algorithms and in this exercise we shall focus on those. The parser provides a representation of …

Member Avatar for Slavi
0
204
Member Avatar for moaz.amin.37

Hello to all first look this code class Square1 implements Runnable{ int a; public void run(){ a=10; } } class Square2 implements Runnable{ Square1 ob=new Square1(); public void run(){ System.out.println("Square Of this number is = "+(ob.a*ob.a)); } } class SquareThread{ public static void main(String args[]){ Thread t1=new Thread(new Square1()); Thread …

Member Avatar for moaz.amin.37
0
1K
Member Avatar for Benny_1

I've been working on a project I found on the Java Projects for learners thread. I've created a pokedex simulator that keeps track of pokemon. So far you can view a list of recorded pokemon, get more detailed info, add a pokemon, and it's all saved to files. However it's …

Member Avatar for Benny_1
0
306
Member Avatar for gajen007

Gentlemen, I have a problem in entering a "DATE" in to MySQL table via a Java SWING interface. I used 'jdatepicker' to select a date & I use XAMPP server for MySQL database. Earlier I converted the selected date in to String values & feed as VARCHAR in mysql table. …

0
107
Member Avatar for surya55

Hi all, consider below code: public class Bertha { static String s = ""; public static void main(String[] args) { int x=4; Boolean y = true; short[] sa = {1,2,3}; doStuff(x,y); doStuff(x); doStuff(sa,sa); System.out.println(s); } static void doStuff(Object o){ s += "1"; } static void doStuff(Object... o){ s += "2"; …

Member Avatar for JamesCherrill
0
283
Member Avatar for FazeLessWhite

Hey guys, I'm trying to make an app where if I press a button an audio plays *I use android studio* The code compiles and all but, if I press the play button then the audio does not play..What am I doing wrong? Thanks! MyActivity.java package com.example.hayzam.bb; import android.app.Activity; import …

Member Avatar for FazeLessWhite
0
224
Member Avatar for ShamirSuhaimi

Create a class named Person that includes fields for last name, first name, and zip code. Include a default constructor that initialize last name, first name and zip code to ‘X’ if no arguments are supplied. Also include a display method, displayPerson() to display Person details. Create a test class …

Member Avatar for Slavi
0
143
Member Avatar for leontran1992

I need help on this question :(. I cant seem to get the right output for this question. 5.25 (Compute pi) You can approximate pi by using the following series: p=4(1- 1/3 + 1/5 - 1/7 + 1/9 - 1/11..... +((-1)^i+1/2i-1) Write a program that displays the p value for …

Member Avatar for Schol-R-LEA
0
258
Member Avatar for jayesh somi
Member Avatar for Navneet_2
Member Avatar for jwenting
-2
203
Member Avatar for BobBob123

im recieving no erors but when im running it im also unable to see the mandelbrot it just displays the grey box, i understand there are other threads on this and i have attempted to use them but im currently stuck at this one point thanks for any help. using …

0
90
Member Avatar for LilPrincess017

Hi thanks for reading this post. Hope you could help me. I have this question i can't figure out. Thanks in advanced for helping :) I kept receiving message dialog box containing "The document has no pages." whenever i click the PrintAllbutton. I used jasperreports, in which i'm not familiar …

Member Avatar for Tarek_2
0
3K

The End.