32,204 Topics

Member Avatar for
Member Avatar for teitsu

Please, i need a thorough tutorials on METHODS AND HOW TO CALL THEM. I also need some elinghtenment on classes in java. I want to really understand this concepts in java.

Member Avatar for stultuske
0
123
Member Avatar for sing1006

for(int i = 0; i < program.size(); i++) if(program.get(i).contains(remp)) with the coding above, i can search and display all string in my arraylist that contains "hit2080". for example HIT2080___Introduction to Programming___ALL___Core___NULL___NULL HIT1307___Internet Technologies___ALL___Core___NULL___HIT2080 but i just want to search and display the first token that contains string "hit2080". Is there …

Member Avatar for sing1006
0
284
Member Avatar for bonzie1923
Member Avatar for JamesCherrill
1
150
Member Avatar for Doogledude123

I know with Lists you can instantiate them to an ArrayList, but is this generally a good idea? Is it better to do 'List<?> list = new ArrayList<?>();' rather then 'ArrayList<?> aList = new ArrayList<?>();'?

Member Avatar for JamesCherrill
0
178
Member Avatar for Doogledude123

I know you can create nested classed (or just classes declared outside of the class in the same file) but what is the point of doing this? Why not just create a new class file?

Member Avatar for JamesCherrill
0
199
Member Avatar for newbie14

I am linking to a webservice all works fine. Below is my codes. private static void printSOAPResponse(SOAPMessage soapResponse) throws Exception { TransformerFactory transformerFactory = TransformerFactory.newInstance(); Transformer transformer = transformerFactory.newTransformer(); Source sourceContent = soapResponse.getSOAPPart().getContent(); System.out.print("\nResponse SOAP Message = \n"); StreamResult result = new StreamResult(System.out); transformer.transform(sourceContent, result); } I am not too …

Member Avatar for jwenting
0
136
Member Avatar for Terens92

You have been hired by an amusement park company to write a JAVA program that prompts a Person to enter their age and height and to find out if they are eligible to ride. A person is eligible to ride if their age is above 9 years and their height …

Member Avatar for jwenting
-3
157
Member Avatar for nutandevjoshi
Member Avatar for jwenting
0
217
Member Avatar for smartguy360

I tried dreamincode but the mods there all seem to be on their periods tonight so i have come here to humbly beg for help. First off let me start by saying I'm a new programmer and I am frustrated and cofused by the class i'm in prg 420. I …

Member Avatar for jwenting
0
391
Member Avatar for hwoarang69

# I am using: # -- Libgdx and Box2d. ------------- # what I am trying to do: # -- I want enemy to move right and left. if enemy hits the wall than move the over way. ---- # My plan: # -- I have two senors set up on …

Member Avatar for JamesCherrill
0
346
Member Avatar for Techboy52

//My objective of the program is using scanner class to get the input from the user and use a dialog box(JOptionPane) for output. When I compile the file I was able to enter the input from the scanner class, but I did not see the dialog box for the output …

Member Avatar for stultuske
0
4K
Member Avatar for umaima_1

//When ever I add TextFields the frame disappears.line 73-76,108-111; import javax.swing.*; import java.awt.*; import java.awt.event.*; public class fitness extends JFrame { private double height=13.5; private double weight=45.3; private int age=20; private String sex="Male"; public fitness(int x){ this.age=x; } public fitness (double wei,double hei){ this.weight=wei; this.height=hei; } public fitness (double height,double …

Member Avatar for mKorbel
0
198
Member Avatar for kevndcks

Hello developers, i have got a problem that i have been trying to solve all day and would be glad if anyone here can help. I have a Java port scanning application which scans for open ports and displays the results in a textarea called "taOutput" when the user clicks …

Member Avatar for happygeek
0
3K
Member Avatar for nidheeshkumar.r

hey, i have stored a few images in mySQL database as BLOB.Now i want to retrieve and display the images on frame as a gallery/grid view.I have displayed one image in a frame but when i tried to add more images it fails...Can anyone help with sample code,coz im new …

Member Avatar for JamesCherrill
0
1K
Member Avatar for mc3330418

I have text file that has multiple x and y coordinates. I'm reding them in and trying to send them to drawrect. The problem I'm having is that the drawRect will only draw the last x and y that is read in here is how I'm reading in. for (int …

Member Avatar for JamesCherrill
0
481
Member Avatar for firepower

how do I make a pictur move?.code: public class picture extends JFrame{ private static final long serialVersionUID = 1L; JLabel ball; int h = 100; int l = 200; public picture() { System.out.println("working"); Icon bb = new ImageIcon(getClass().getResource("ball.jpg")); ball = new JLabel(bb); ball.setBounds(10, 10, h, l); ball.addKeyListener(new KeyListener() { public …

Member Avatar for Taywin
0
163
Member Avatar for masonketcham

To my Inventory Program Part 4 there are three parts and I was able to compile successfully with the first two. I end up get several errors with part 3 and I am unsure to why. This is what I have. import javax.swing.*; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.FlowLayout; import …

Member Avatar for Doogledude123
0
328
Member Avatar for Tinnin

Hi All, I'm running through "Head First Java" and I'm hitting a snag with an exercise involving RMI. My Classes ---- package myremoteimpl; import java.rmi.*; import java.rmi.server.*; /** * * @author Michael */ public class MyRemoteImpl extends UnicastRemoteObject implements MyRemote { public String sayHello() { return "Server says, 'Hey'"; } …

Member Avatar for Tinnin
0
4K
Member Avatar for quackyeji

CharToString.java: Declare a character variable (char ch). Read a character into the variable ch and then store it in a String variable using the valueOf method. Print out both the char and string value at the end to test your program. (Note that the valueOf method is static... this means …

Member Avatar for jwenting
-1
226
Member Avatar for The king

[CODE]Hi every one, hope u r fine. i have a java program and it call matlab exe file ,but i have a problem in run time it is so so slow . i need a help in how to make this faster, i will be grateful for any help Hint: …

Member Avatar for stultuske
0
881
Member Avatar for jazzermonty

Hi guys I've written a very simple program that reads in some files, does some cleanup on the data and then creates a sql statement to insert the data into a table. Now I have 125 of these fies of varying sizes and on some (not all) of the files …

Member Avatar for jazzermonty
0
318
Member Avatar for wids101

I wanted to know how i can print the purhcase that the user got. Thank you. import java.util.Scanner; public class VendingMachine { private double chips; private double cookies; private double soda; private double gum; private double candy; private double energyDrink; private Scanner kb; private int dollar; private int quarters; private …

0
208
Member Avatar for Richa_2

1) What are three ways of creating a String object ? 2) What is the difference between string concat method and simply adding 2 strings ?

Member Avatar for Richa_2
0
282
Member Avatar for surya55

Hi all, What is the difference in inheriting a class and instantiating a class, as both allows to inherit properties from the base class.I know there is a difference in both, but i want a clear idea on this. Kindly, can anyone help.Thanks in advance.

Member Avatar for Doogledude123
0
200
Member Avatar for Doogledude123

Alright, so I am simulating a rice roll 100 times, repeatedly. It's getting some whack numbers for some reason, I can't find the problem in code. I have done some printing of the different variables and it seems fine, but I know theres something wrong. package com.github.geodox.dicerollingstats.main; import java.util.Arrays; import …

Member Avatar for Doogledude123
0
343
Member Avatar for jan.sehona.1

You have been hired by an amusement park company to write a JAVA program that prompts a person to enter their age and height and to find out if they are eligible to ride. A person is eligible to ride if their age is above 9 years and their height …

Member Avatar for JamesCherrill
0
197
Member Avatar for jan.sehona.1

Critically analyze the following statement "Multiple inheritance can be achieved without interface"?

Member Avatar for JamesCherrill
0
231
Member Avatar for ishaan3731

Hi guys, I have a non-cse background but due to some reason i have to submit a java project at my college. As a result i downloaded a employee management project from a website.It has some jsp pages , some java class files , folders named META-INF and WEB-INF.I used …

Member Avatar for stultuske
0
289
Member Avatar for sireiz

Hi everyone, When i click on the ireport icon, it shows the splash screen but then nothing happens. I tried to override the default jdk path in ireport.conf file and changed it to the jdk path i am using but it didn't solve the problem. Then i uninstalled the software …

0
135
Member Avatar for sireiz

Hi everyone, Please help me to register the sql query exceutor in netbeans and java. I am using ireport 5.5.1 and netbeans 8.0 with jdk 8. The problem is that when i run the reports within netbeans, they run but when i build the project and run it from a …

0
193

The End.