32,199 Topics

Member Avatar for
Member Avatar for Progr4mmer

I was watching the java game tutorials by thenewboston on youtube but he stopped making them. Anyone know of any good tutorials for making java 2d or 3d games?

0
74
Member Avatar for Katana24

Im aware of the different data types in java but say if one wanted to have two different types of data in a single array; integer and string, would this be possible? Im aware that java can have an array of each type but I stumbled upon using this and …

Member Avatar for Katana24
0
197
Member Avatar for curbster

Hi all, I have to declare an array of LibraryBook objects and sort them either by title, author or page count, as the user requests. I've got the basics down but I'm missing something. [CODE]public class LibraryBookSort { public static void main(String[] args) { LibraryBook[] myBook = new LibraryBook[5]; myBook[0] …

Member Avatar for jon.kiparsky
0
234
Member Avatar for z00t

implement a class Employee. an employee has a name (a string) and a salary (a double). provide a constructor with two parameters. public Employee (String employeeName, double currentSalary) methods: public String getName() public double getSalary() public void raiseSalary(double byPercent) this is what i have so far: [ICODE]public class Employee { …

Member Avatar for z00t
0
4K
Member Avatar for SaberExcalibur

I have an average knowledge in the whole programming thing but I would really like to excel to this field. I would like to ask our IT professionals and programmers if what books do you recommend me to refer to while learning Books for *Java *advance css,web page *Visual basic …

Member Avatar for jlego
0
187
Member Avatar for StevoLord

Hi All, I am a newbie at java and need some help. I have a JFrame setup where basically I want to show two pictures. I have everything setup however at sleep, timers ect dont currently work and I dont know why. The snipplet of code below should show imagePanel1 …

Member Avatar for StevoLord
0
116
Member Avatar for Harliquin

Ok, so I have to write a program for school that will read data from a text file, split the data (comma delimited) into the correct type, pass that information on to a class, store the class object into an array. This is what I have so far: [CODE]import java.io.*; …

Member Avatar for Harliquin
0
150
Member Avatar for bagichris

Hello All Am having some challenges getting a value in a variable from another class; the code that computes the variable happens to be in a timertask method however if i move that same line of code to the constructor, the second class is able to fetch the value. When …

Member Avatar for Akill10
0
150
Member Avatar for boifang

i have been strugling to identify my error but i have failed to solve the problem my code errors is incompatible types in line 11. [CODE]import java.io.*; public class Appliance { public static void main(String args[]) { try { File file=new File("Name.txt"); FileReader f=new FileReader(file); int ch; while(ch=f.read()) { System.out.print((char)ch); …

Member Avatar for masijade
0
130
Member Avatar for Phatsimo Mosiam

when i write the following code the results tell me that no mainmethods, applets or MIDlets found in file: [CODE]import java.io.*; public class Appliance { NIIT Developing Object Based Applications in Java Assignment A.9 public static void main(String args[]) { try { File file=new File("Name.txt"); FileReader f=new FileReader(file); int ch; …

Member Avatar for masijade
0
61
Member Avatar for haribasker

[CODE]import java.awt.*; import java.awt.event.*; import javax.swing.*; import java.sql.*; import java.util.*; import java.net.*; import java.io.*; import javax.swing.border.*; public class userdetails extends JFrame { private JLabel jLabel1; private JLabel jLabel2; private JLabel jLabel3; private JLabel jLabel4,jLabel5; private JLabel jLabel7; private JLabel jLabel8; private JTextField jTextField1; private JComboBox jComboBox1; private JComboBox jComboBox2; private …

Member Avatar for masijade
0
265
Member Avatar for rhoxart faye
Member Avatar for fugmag

Hello I am trying to get a SELECT stament to work i Java. The staement has a parameter, but Eclipse gives me the following error message: You have an error in your SQL syntax, check the manual that corresponds to your MySQL version...... Is it possible to show me how …

Member Avatar for masijade
0
221
Member Avatar for haribasker

contentPane.setLayout(null); JPanel panel = new JPanel(layout); panel.setBackground(Color.WHITE); addComponent(contentPane,panel, 0,0,595,375);

Member Avatar for masijade
0
8K
Member Avatar for jips11in

THis is program in java for First 100 Prime Number as "count<100" . public class PrimeNumber { public static void main(String args[]) { int num=4; int count=0; System.out.println("First 100 Prime Number is: "); System.out.println("1"); System.out.println("2"); System.out.println("3"); while(count<100) { num++; if(num%2!=0) { int dv=3; while((num%dv!=0)&&(dv<=((num-1)/2))) { dv++; } if(num%dv!=0) { count++; …

Member Avatar for masijade
0
159
Member Avatar for Anuradha Mandal

[CODE]import java.io.*; import java.net.*; import java.awt.*; import java.awt.event.*; import java.awt.geom.AffineTransform; import java.awt.image.*; import javax.imageio.*; import javax.swing.*; class ImageDrawingComponent extends Component { static String descs[] = { "Simple Copy", "Scale Up", "Scale Down", "Scale Up : Bicubic", "Convolve : LowPass", "Convolve : Sharpen", "RescaleOp", "LookupOp", }; int opIndex; private BufferedImage bi; …

Member Avatar for varshakite_21
0
188
Member Avatar for arkaayan

I want to make a java application which'll get all paypal transaction history and the details of each transaction from paypal server and store them into my database. But I can't find a way to retrieve the transaction history from paypal server. I searched the internet and came to know …

0
47
Member Avatar for caswimmer2011

Hi, I have a program that uses JButtons (under ActionEvent e) and the user clicks a button and it brings up the appropriate text file associated with that name. I have the files on a flash drive but every time i transfer the files to different computer and want to …

Member Avatar for caswimmer2011
0
154
Member Avatar for eikal

Hey for hw i gotta do a program that spits out the perfect squares between 0 and a number entered... well i got it done but it spits out 1 extra number that goes OVER what the person entered... here's my code. [code] public static void main(String[] args) { String …

Member Avatar for ztini
0
116
Member Avatar for Hakoo

Hello Friends, I want to synchronize the database from server to mobile application. I googled so much. I got much information on : [LIST] [*]DB2 Everyplace [*]IBM CloudSpace [*]PointBase(Not able to download) [*]Sync4j [*]SyncML [*]Data Sync API(Not able to find) [/LIST] Now I am confused to which one to select? …

Member Avatar for Hakoo
0
170
Member Avatar for kukuruku

Is there method in Java to compare the strings first letter and sort the alphabetical or I have to substring and compare them with bubble sort Thanks

Member Avatar for btsuper
0
142
Member Avatar for Latvija13

I'm wondering if there is a more efficient way to take a 10 character (mm/dd/yyyy) date of birth String and calculate the age of the user as of today's date. My code works perfectly fine, but I feel like it could be more efficient. [CODE] package dates; import java.util.*; public …

Member Avatar for Latvija13
0
133
Member Avatar for kukuruku

HI ,I am new in Java and i have trablle creating array of objects .This are my files,and I need to create array of objects patients thank you in advance for your help import java.util.*; public class MainPatient { public static void main(String[] args) { int choice=0; Scanner input=new Scanner(System.in); …

Member Avatar for ztini
0
246
Member Avatar for fengapapitt

Hey guys, I need a little help on PigLatin translator. This is "driver" class I'm given that I cannot change [CODE]import java.util.*; public class PigDriver{ public static void main(String[] args){ Scanner scan = new Scanner(System.in); String t = " "; Piglatin p = new Piglatin(); while(t.length() > 0){ t = …

Member Avatar for peter_budo
0
112
Member Avatar for scratchy999

I'm trying to write a program where I want the user to enter a positive whole numbers into the input box. I would also like to throw up a warning if they enter a decimal, letter, or negative number. I know how to do this with the negative condition, but …

Member Avatar for jon.kiparsky
0
148
Member Avatar for Progr4mmer

i need help drawing an image in an applet for some reason it doesn't show up but there are no errors [CODE]package Game; import java.applet.*; import java.awt.event.*; import java.awt.*; import javax.swing.ImageIcon; public class AppletOne extends Applet implements Runnable, KeyListener{ int x_pos = 10; int y_pos = 100; int x_speed = …

0
90
Member Avatar for Progr4mmer

i want to make a 3D game in Java but the tutorials i was watching aren't being made and i don't know which 3D to use because j3d looks pretty bad... and i'm not new to Java just new to 3D.

Member Avatar for Ezzaral
0
113
Member Avatar for Climber Ty

Okay here's what I have... but my test cases when running the program are not allowing me to input negative, decimal, or exponents as temperatures. I know it something small but it's alluding me, I figured if I had F and C as double it would work. Any ideas? Another …

Member Avatar for Climber Ty
0
185
Member Avatar for felito

hello guys is the following, I have four players on the king, and I need to check if they are bluffing, because in the first round have to assist to the suit, so, I want a method that is used by four players the question is now, so I have …

0
90
Member Avatar for lorettah

import java.io.*; public class Appliance { public static void main(String args[]) { try { File file=new File("Name.txt"); FileReader f=new FileReader(file); int ch; while((ch=f.read()) { System.out.print((char)ch); } } catch(FileNotFoundException fnfe) { System.out.println("Exception: "+fnfe.toString()); } catch(IOException ioe) { System.out.println("Exception: "+ioe.toString()); } } }

Member Avatar for jon.kiparsky
0
121

The End.