32,204 Topics

Member Avatar for
Member Avatar for Maureen

I am new to programming, so please accept my apologies if this question is simple. I have a class (say called Student). I want to store the name of the student (name) and the course (course) I have declared some variables in my Student class: [code] private String name = …

Member Avatar for manjushreekaran
0
3K
Member Avatar for Syrne

I'm having some trouble with this section of code: [CODE] for(int i = 0; i < MAX_NUM ;i++) { subList[i].readIn(); System.out.println("\nDo you want to enter another subscriber? " + "(Y/N): "); anyMoreSub = keyboard.nextLine().toUpperCase(); if (anyMoreSub.equals("N")) { break; } } while(!isDone) { menuChoice = JOptionPane.showInputDialog("Please enter the letter for " …

Member Avatar for Syrne
0
151
Member Avatar for elkowalski

hi guys i am doing an applet that reads information from a website, stores it and uses it to graph the data and displays it in a very friendly way. it works perfectly fine in the viewer when i run it in eclipse but as soon as i try to …

Member Avatar for elkowalski
0
519
Member Avatar for mastdesi

I have to do my first assignment for my java class for friday this week. So due in 3 days. I wrote the polynomial class but haven't done the driver for it yet as i don't know if my polynomial class is good. Please check and let me know if …

-1
134
Member Avatar for diew

please, i am new to java and have this project on generating a university timetable using genetic algorithm. this software is to be a GUI based software... please can any one give me ideas about how i can go about it... thanks

Member Avatar for Taywin
-1
269
Member Avatar for transplantedNYr

Now this question is being written in Scala, but Scala is Java compatible. I will translate the java code into Scala. // Write a recursive function "upto" // that takes two Int parameters "start" and "end" and produces a "List[Int]" // that counts DOWN from "start" to "end" (inclusive at …

Member Avatar for transplantedNYr
0
192
Member Avatar for raul8

Hi, I want to transfer files between 2 servers. But Not able to find any decent tutorials. Please suggest some. If there's any api...then much better. Thank You

Member Avatar for thines01
0
127
Member Avatar for us0343

hi gyz, i've got my first Assignment of java. first i do coding plz take a look. : /* The HelloWorldApp class implements an application that simply displays "Hello World!" to the standard output. */ public class HelloWorldApp{ public static void main(string[]args){ //Display the string.No global main System.out.println("Hello World!"); } …

Member Avatar for us0343
0
177
Member Avatar for crazins

Hi, I have to do program that uses a for loop to traverse a linked list. I have 99% of the program done and ready to go but our professor wanted us to use a specific loop which is the loop on line 31. I don't understand what b is …

Member Avatar for crazins
0
313
Member Avatar for gunjannigam

In my application, I have to draw 25 images of 700*500 pixels. I am trying to use ImageIO.read() method, which is called by creating another Thread. Its taking too much time to read images. I thought since i am calling the image read functions by creating another thread my another …

Member Avatar for mKorbel
0
837
Member Avatar for cse.avinash

In the book "The Complete Reference-JAVA" by Herbert Schildt. Its written there that "In C/C++, char is an integer type that is 8 bit wide and char in JAVA is a unicode 16 bits wide." I ve understud the point but I want to ask that char in JAVA isn't …

Member Avatar for JamesCherrill
0
90
Member Avatar for cse.avinash

In C, array is sequence of variables. int arr[3]; if arr is 2000 then arr+1 is 2000+sizeof(int). lly arr+2 is 2000+2*sizeof(int). in that way array elements are accessed but in JAVA array elements are dynamically allocated using new. then how all others variables are accessed, means I want to ask …

Member Avatar for JamesCherrill
0
152
Member Avatar for NyQii

I have a code which works, but I need a main method. can anyone please tel me where I can put the main method, I'm still struggling with that and maybe someone can give me pointers for the future. Thanks [CODE]public class BinaryTree { BinaryTree left; BinaryTree right; int value; …

Member Avatar for NyQii
0
133
Member Avatar for jayyzhao

Hi Guys, I have a problem which in java i have a method called turn() is there a way to count the amount of times it gets called upon, ultimately counting the amount of turns?

Member Avatar for hszforu
0
425
Member Avatar for hszforu

i have two classes:parentbox and chiildbox [CODE]class parentbox { int width; int height; int length; }[/CODE] [CODE]class chiildbox { public static void main(String args[]) { parentbox babybox1= new parentbox(); parentbox babybox2=babybox1; babybox1.height=10; babybox1.length=19; babybox1.width=2; int vol; System.out.println("the vol of babybox1 is"+(babybox1.height*babybox1.length*babybox1.width)); //parentbox babybox2=babybox1; System.out.println("Now babybox2 contains:"); System.out.println("babybox2.height=",+babybox2.height); System.out.println("babybox2.length=",+babybox2.length); System.out.println("babybox2.width=",+babybox2.width); } …

Member Avatar for hszforu
0
258
Member Avatar for chiiqui

I've already read the stickied about "STarting java" but the thing is I am not starting java, soo my question is, what's the best book to learn core java and Java EE? and what's their difference and it would be good if you will site the books you've read regarding …

Member Avatar for hszforu
0
355
Member Avatar for kiko11

[CODE]/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package schedule; /** * * @author Kix */ import java.awt.*; import java.awt.event.*; import javax.swing.*; import java.sql.*; public class Fourth extends JFrame { static JLabel lblFaccode,lblFaculty,lblSpace,lblSpace1; static JButton btnExit; static JTable tblOne; …

Member Avatar for Taywin
0
170
Member Avatar for vaironl

Hello forum vaironl here, I'm having a little bit of trouble with a school assignment which is storing up to 10 names and printing them out in the command box or just printing out the names if the user presses -1. For some reason my loop doesn't wait for the …

Member Avatar for stevanity
0
2K
Member Avatar for punitdam

I am getting error SEVERE: java.lang.UnsatisfiedLinkError: no j3dcore-ogl-chk in java.library.path when I am trying to run Applet. Do any one have any idea.

Member Avatar for punitdam
0
2K
Member Avatar for ChunkyGerbil

Hey guys, I need help with my homework. I'm super new to coding on my own as you can see and I need to create a character counter using an array, in just this one method. [CODE] public int[] letterCounts(String s) { int count = 0; int[] array= new int …

Member Avatar for teo236
0
128
Member Avatar for tariqi

Hi guys, I need help on how I can screen scrap a phone application into a desktop application,I want the user to be able to execute the application,s commands from the computer.I am new to screen scrapping so I dont have a clue where to start. Any ideas?

0
61
Member Avatar for ozgamu

What happens is that when i run my program from netbeans it works fine and it shows all the images but when i run the .jar file it doesn't show any of them...the images are declared below the "//Imagenes automata" comment by the way, im new in Java so please …

Member Avatar for peter_budo
0
153
Member Avatar for NexG

This is my attempt at the Euclid Algorithm. I would like it if someone could give me some pointers on how to fix this so that it would work. It compiles fine. [CODE]import java.util.Scanner; public class Euclid{ public static void main(String[] args){ Scanner scanner = new Scanner(System.in); System.out.print("Enter the first …

Member Avatar for NexG
0
117
Member Avatar for sirlink99

I am just learning how to use sockets, and I have managed to get my server to send a message to my socket, but when I try to send a message from my socket to my server I get an error. Here are my codes Server: [CODE] package BasicNIO; import …

Member Avatar for NormR1
0
311
Member Avatar for Prisms

Ok guys I'm almost done with my GPA program but I hit a snag. everything works fine but when I insert a letter grade the program doesn't read what number it corresponds to and sets double number to zero. Can some please let me know what I'm doing wrong. [CODE]import …

Member Avatar for Prisms
0
5K
Member Avatar for Whilliam

So guys, I'm very new to Java and I have just developed my algorithm of opening forms. However, I've also recently read about singleton pattern. I don't know how Java works internally but I want to ask an expert's advice. Is this implementation efficient? Compare it with singleton. How good …

Member Avatar for Whilliam
0
111
Member Avatar for Curt1337

Hi there all, I really need help on this one, I went away for a wedding for a week and missed a week of work and now I have a practical due for 1:00 10 tomorrow and I got back today, but I managed to complete all of the programming …

Member Avatar for Ezzaral
-2
390
Member Avatar for theadjectivenou

Hello World! I am a new student to Java. and I find it interesting since I never programmed anything but struggling a bit. I have the book Java: How to program, 8th edition. and we started in loops today. and he asked us how to make int j = 1; …

Member Avatar for Ezzaral
0
145
Member Avatar for misspuja

hello...... sir i have to make the program which get date of birth and give me result in term of how many year,months,days,hours,minutes and second old user is... i need the help...

Member Avatar for NormR1
0
164
Member Avatar for nathanbe

Hi friends I have been developing a web application in mvc which is in need of using database mysql. I am suffering from the same problem we are discussing for the following code. I am collecting the data for the tables from a form. I had added mysql-connector-java-5.1.17.zip by right …

Member Avatar for peter_budo
0
106

The End.