32,205 Topics

Member Avatar for
Member Avatar for bigredaltoid

Hi all - this is the code: package sodukupackage; import java.util.Scanner; import java.io.File; import java.io.FileNotFoundException; public class ReadSudokuValuesIntoArray { public static void main(String[] args){ int[][] sudoku = new int[9][9]; Scanner sc = null; try{ int i = 0, j = 0, count = 1; sc = new Scanner(new File("validsudoku.txt")); while …

Member Avatar for Taywin
0
371
Member Avatar for JavaDroid

I am looking for help in creating an inventory system for my text based adventure game that I am writing in java. i have shared the *.java* files here: https://docs.google.com/folder/d/0B2crBUQ5i6iBRkFpanJiRGFfMWc/edit any suggestions would be appreciated, as well as any critiques of the current code.

Member Avatar for NormR1
0
127
Member Avatar for prem2

Hi team, Can any one say what is instance Method in java ? *Method Overriding Concept? Thank you, with Regards, Prem

Member Avatar for JamesCherrill
0
2K
Member Avatar for minimee120

Here's what I have so far, I'm just having trouble writing the second part that will say that the string in the text file isn't there if the user enters a number thats not saved in the text file (data3.txt). Also how would I make it so that the program …

Member Avatar for NormR1
0
2K
Member Avatar for ToneZ

Anyways, I'm having trouble with this Cash Register code. I've been working on it for a day now, and it still won't work. Any ideas? import java.util.*; import java.io.*; public class Cash { public static void main(String[] args) { Scanner console = new Scanner(System.in); int amountDue,amountPaid; double pennies,dollars,nickels,dimes,quarters; System.out.print("The amount …

Member Avatar for Taywin
0
317
Member Avatar for rrr12345

I am thinking of something that would require extreme use of algorithms, maybe a search engine or a distributed computing systems. Any other idea for heavily algorithim based project that would of course increase my marketability ? and by the way i have 2 instead of 1 year to complete …

Member Avatar for Taywin
0
283
Member Avatar for minimee120

My assignment was to create a Directory Lookup, that prompts the user for an input (inputting a number i.e. 5) and the program returns whether the input number is in the .txt file or not. Having some trouble, have re-edited my code numerous times already, but here's what I've amounted …

Member Avatar for Taywin
0
137
Member Avatar for ali11

import java.util.Arrays; import java.util.List; import java.util.Random; class DynamicArrayOfInts { private int[] storage; private int size; private final int INITIAL_CAPACITY = 8; private final int GROW_FACTOR = 2; public DynamicArrayOfInts() { storage = new int[INITIAL_CAPACITY]; size = 0; } private void rangeCheck(int index){ if (index < 0 || index >= size) …

Member Avatar for Taywin
0
242
Member Avatar for Hemanth.Satkuri

Hi, I have a file uploaded in DB. Can i download it from Swing application. By Download I mean with options like Open,Save,Cancel and set the response type based on the file's extension. Thanks in Adv. :)

Member Avatar for NormR1
0
245
Member Avatar for softswing

Hi, Please help me in how to use findbugs static tool clouds in eclipse.

0
65
Member Avatar for jrosh

I want to draw a chart similar to area chart in asp.net. possible to use js / jquery. I tried out java script libraries that are available to draw charts, But those has no chart per my requirement. But I couln't find any pure code examples to draw a chart. …

Member Avatar for jrosh
0
160
Member Avatar for sapure

I admit it's a part of an assignment but I don't understand what the assignment require in this part. This program is supposed to read 10 numbers from the keyboard and then the application findMax will take one single command line argument. If you invoke findMax 1, it will print …

Member Avatar for sapure
0
314
Member Avatar for FUTURECompEng

What is the running time for the following recursive function: pubic static int Sum(int [] a, int start, int end) { if ((end – start) = =0) return a[end]; else { int mid = (end + start) / 2; return (Sum(a, start,mid) + Sum(a,mid+1,end)); } } Can someone please explain …

Member Avatar for FUTURECompEng
0
298
Member Avatar for k22mac

I am taking an intro level java programming class and i am a little stuck at the moment. I'm trying to use a the replace method. My objecti with this program is to gather a phrase from the user and then have it print the same phrase with some characters …

Member Avatar for dimasalang
0
114
Member Avatar for codechrysalis

Ok so this is my code so far: I have a issue where near the end in the getSum() method I need a way for the all the methods that i have that ask for the user input need to go into the respective arrays that i made in the …

Member Avatar for NormR1
0
209
Member Avatar for gotto

I am given the amount of data and the time used. It asks for the time complexity. It is in a Big-O packet Below is the first problem given Algorithm A Data Time 1000 .003 2000 .012 4000 .048 8000 .192 Please explain how to get the time complexity. Thanks!

Member Avatar for gotto
0
394
Member Avatar for i.nikei

hello. i am a new learner. i build some program that able to read .doc file and pass them to Cache database. i've done the passing part. but the problem is, how can i diffrentiate between paragraph and table content? for example, i have **Section A** as a title and …

Member Avatar for NormR1
0
133
Member Avatar for jemz

Hi,i have a program and i created into a jar file,but the problem is when i am going to remove the jar file into the directory where my java classes and pictures resides,when i click the jar file the picture of my buttons are gone.can you help me please how …

Member Avatar for jemz
0
412
Member Avatar for abders

The GUIFlowLayout is giving me some trouble, the GUIFrame works fine. I have copied this from the Java programming book which I am using (Introduction to JAVA, eight edition, by Y. Daniel Liang). I get red error lines under 'setLayout', all of the 'add' words, and all the 'setTitle, setSize' …

Member Avatar for abders
1
288
Member Avatar for mohamed moamen

I'm do program that when i press by mouse in any cell in table that print the cell position in a text field but i have a problem that's do nothing need help plz note ( I'm use jfram form and drage in it jtable and jtextfield ) [CODE] public …

Member Avatar for mKorbel
1
148
Member Avatar for ibthevivin

My Java is pretty rough. So far I've completed one class of Java all the way up to basic array functions. I've asked my Professor to explain it, but he talks with so much jargon. Could someone explain to me why this program spits out the "24" when I run …

Member Avatar for richard89AZ
0
253
Member Avatar for javalover

Hi frnds!!! Am new to ubuntu .. Am using netbeans7.1 .. I need to connect my java application with mysql server... I dont know how to configure netbeans for that.. I tried to configure mysql server in netbeans itself through (Right Click Databases-> select Register MYSQL Server-> select Admin Properties) …

Member Avatar for Ajinkya Jagtap
0
223
Member Avatar for Stjerne

Hello again, This time, I want to create a simple function where you choose a date with JSpinner, and next to it, I want a textfield where you can enter the time. I've already created a JSpinner with both date and time, but it kind of looks bad, but that's …

Member Avatar for Ajinkya Jagtap
0
324
Member Avatar for london-G

When I run the application my labels are al spaced out, however in the design they are fine. Do you have any ideas why? Also when I preview the jframe everything looks fine. Thank you

Member Avatar for Ajinkya Jagtap
0
106
Member Avatar for will.penfold.71

private ArrayList<Student> students; public void loadFromFile(String x){ try { FileReader reader = new FileReader(x); Scanner in = new Scanner(reader); int lineNumber = 1; while (in.hasNextLine()) { String name = in.nextLine(); int score = in.nextInt(); students.add (new Student(name, score)); lineNumber++; } in.close(); Hey Guys i am getting unknown errors when trying …

Member Avatar for jalpesh_007
0
158
Member Avatar for abdulhamid1
Member Avatar for jamesmadison43

I am supposed to create an arraylist from an integer[] array, iterating the elements in the list in decending order ex: int[] array = {1,4,2,3,5}; goes into array list to become {5,4,3,2,1} how do i even being to do this (without first sorting the array and then putting it into …

Member Avatar for jalpesh_007
0
300
Member Avatar for jalpesh_007

dear all, I am working on hashmap and treemap. At the starting of my program i have declared two map,m1 and temp,both are hashmap. At starting point both map contains same kay value pair. At some instance of program, i want to change the value in temp, remove some key …

Member Avatar for jalpesh_007
0
746
Member Avatar for delta_frost

What is the component called in a GUI ? I am designing an application where I need to show certain usernames besides along with the points they have scored in a game.I don't want to do it in a table.I want to use the component shown in the picture below.But …

Member Avatar for Taywin
0
119
Member Avatar for sk8ergirl

Hello my question how can I split array of string to another string using for loop for example if i have this array of string joe,DE2300,A sam,RM4901,B allay,SM9800,D << name, course, grade I want to split the array to another array so the output will be //I want this list …

Member Avatar for sk8ergirl
0
296

The End.