35,618 Topics

Member Avatar for
Member Avatar for asifalizaman

hi!guys i am very glade to told you that you guys must learn java programing language because i think aproximate one billion devices are running java...so first of all i recommeded you that you guys get the "The complete Java reference book 2"it is the best book for you guys …

Member Avatar for mike_2000_17
-3
577
Member Avatar for saurabh.mehta.33234

public class HelloWorld{ static int a; public static void main(String []args){ System.out.println("Hello World"); HelloWorld h =new HelloWorld(); a = h.foo(); System.out.println(a); } int foo() { try{ throw new Exception(); } catch(Exception e){ System.out.println("catch"); return 9; } finally{System.out.println(a);return 10;} } } When I ran the above code output was: Hello World …

Member Avatar for IIM
0
163
Member Avatar for Kiefchief

How would I put the output is rows of ten? public static void main(String[] args) { int count = 1; int j = 0; // for (the numbers from 100 to 200) for (int i = 100; i <= 200; i++) // if (this number is divisible by 5 or …

Member Avatar for stultuske
0
3K
Member Avatar for shotokanpoloto

I have a java project which is written by JCreator.I've never use JC before(I'm a netbeans user) I installed JCreator and now can't open the project.Maybe I don't know how... There is .project and .classpath files and src , bin and .settings folders.

Member Avatar for stultuske
0
59
Member Avatar for Nandomo

package battleship; import sun.audio.*; import java.io.*; public class Sound // Holds one audio file { public void playIntro() { AudioStream bGM; try{ bGM = new AudioStream(new FileInputStream("intro.wav")); AudioPlayer.player.start(bGM); } catch (IOException error){} } } I have that on one of my games and the music doesnt run, any help? If …

Member Avatar for stultuske
0
233
Member Avatar for mdfaisalamin

Hello, I am trying to access a binary file with scanner functionality. I am trying to extract integer, long double value from the binary file. The binary file formation is as follows The binary file is in little Endian and is structured as follows: * * <ul> * <li>1 integer: …

Member Avatar for ~s.o.s~
0
242
Member Avatar for Vaspar

Hi everyone I am trying to make a project "Remote Administration" in which i have to connect with computer using RDP I am beginner of android and I must submit this project soon so, anything you can help with?? i don't want source codes please tell me what to look …

Member Avatar for deltascrow
-1
82
Member Avatar for bhanu1607

Hi All, This is Bhanu Teja M. I just wanted to write a online quiz application, which various people can participate in quiz from different locations. For this, i need to maintain a single screen for all users and maintain and display the same data,status across the all participents. Can …

Member Avatar for deltascrow
0
305
Member Avatar for game06

i was test collision between ball and box. i have a ball and long rect(platform) on screen. the collision part works fine. but i want to test where the ball is touch the platform. so if ball touch the ball from left or right or top or bottom. but when …

Member Avatar for JamesCherrill
0
149
Member Avatar for HankReardon

Hello Friends, I am having trouble with a homework assignment and was wondering if you would please take a look at it for me. I have to write a program that receives a prefix expression. Then it calculates and displays the result. It does this by using a stack to …

Member Avatar for HankReardon
0
334
Member Avatar for SHINICHI

I'm currently try to write a program as below : A college would like to automate managing courses offered to students. initially only three courses are involved. each courses has a code, a name, students enrolled, a current number of student, a maximum number of students allowed (quota) which is …

Member Avatar for JamesCherrill
0
240
Member Avatar for somjit{}

can anyone help me understand this code part ? this is about binary minimum heap , ie root has the lowest key.. the part of the code im trying to understand checks whether the subtree ( of a certain minHeap pq[1..N] ), rooted at k is also a min heap …

Member Avatar for somjit{}
0
194
Member Avatar for cmps

Hello all. Currently I develop PHP website, and I do simple java programs. Since I will continue learning more and more java, I decided to learn JSP/Spring MVC (Don't really know how Spring MVC Framework uses JSP, check next paragraph) combination of my web knowledge and the Java programming language. …

Member Avatar for cmps
0
255
Member Avatar for saurabh.mehta.33234

This might be a very basic question but still I am not able to figure out why is the foll code giving stackoverflow exception in main?? public class HelloWorld{ public static void main(String []args) { System.out.println("Hello World"); Animal c = new Animal(); } } class Animal { Animal e = …

Member Avatar for saurabh.mehta.33234
0
139
Member Avatar for solomon_13000

I wrote a code to represent the factory design pattern as below: package com.factory2; public interface CreditCheck { Double creditLimit(int id); } package com.factory2; public class CreditCheckFactory { public boolean isAgencyUp(){ return true; } public CreditCheck createCreditCheck(){ if(isAgencyUp()){ return new CreditCheckOnline(); }else{ return new CreditCheckOffline(); } } } package com.factory2; …

Member Avatar for JamesCherrill
0
285
Member Avatar for gyno

**I use Netbean Platform in learning coding in Java, but now it has gotten to a level where i need a server application to further my learning,but i saw Apache Tomcat and Glassfish server as part of plugins that came with my netbean, so i want to know what i …

Member Avatar for radhakrishna.p
0
177
Member Avatar for trishtren

Iv been developing a parser using java, however due to testing on multiple machines i have errors now on one machine i corrected as the machine was using jdk/jre v1.6, and on my newer machine jdk/jre 1.7 The question i have is, what are the implications of using the String …

Member Avatar for delta_frost
0
300
Member Avatar for Nagarajan M

Hi Friends, I have PSKC XML file.. That contains my Salt/Key,IV(Initialization Vector),Encrpted Data,password also. Now, I am trying to Do Password Based Encyption and Decryption Using PBEWITHSHA1AND128BITAES-CBC-BC Algorithm. It works,If i generate salt and IV randomly. But,it fails to work,if i dont generate it randomly... Instead of generating Salt and …

Member Avatar for JamesCherrill
0
2K
Member Avatar for game06

i had a question but i am not sure what the problem is. if user keep right key down. than camera should move left.and my player should fall down bc there are two empty(sky,'0') under player. move camera. 2d map: (0=sky,1=ground,2=player) 0,0,0,0,0,0,0,0,0 0,0,0,0,0,0,0,0,0 2,0,0,1,0,0,0,0,0 1,1,0,0,1,0,1,1,1 int camera_pos_x = 0; int …

Member Avatar for JamesCherrill
0
192
Member Avatar for PreethiGowri

My TCP/IP server socket is not accepting connections from other systems. When i try to send data from the client to server within the same system i see them working fine, Here is what i get by printing the stacktraces - Waiting for client on port 50000... java.net.SocketTimeoutException: Accept timed …

Member Avatar for JamesCherrill
0
1K
Member Avatar for bibiki

Hello everyone, I am puzzled... when I run a JUnit test, there is no main method in the class and it still runs. Alo, a java/maven web app does not have a main anywhere. My assumption is that it is hidden somewhere on some class I somehow extend or something. …

Member Avatar for bibiki
1
127
Member Avatar for DevilDog22

I am making a video poker game for my class assignment. I have the program running that gives out 5 cards. I don't know the easiest way to do this but say after card1 suit1 is dealt I want those values stored so card2 suit2, card3 suit3, etc.... cannot have …

Member Avatar for <M/>
0
180
Member Avatar for nithyananthanaiker

Hello guys, I am currently doing my final year project on OCR. I will have to come up with chain-code algorithm as the recognizer. Any of you guys have sources or links that will lead me to the solution? I have googled much but I could not find a Java-based …

Member Avatar for <M/>
0
215
Member Avatar for deadsolo

Hi everyone! I am having troubles making the second IF statment execute in my code: Pattern dl_noise_rates_p = Pattern.compile("\\d+\\s(.+)\\s(.+)\\s(.+)\\s(.+)"); Matcher dl_noise_rates_m = dl_noise_rates_p.matcher(lineString2); if(dl_noise_rates_m.find()){ String s_dl_nr1 = (dl_noise_rates_m.group(1)); //checking for non numbers pulled in the regex if(s_dl_nr1 == "NaN"){ //| s_dl_nr1 == "NaN" | s_dl_nr1 == " NaN" System.out.println ("OMGOMGOMGOMGOMGOMGOMGOMGOMG …

Member Avatar for bguild
0
184
Member Avatar for andra.durdun

Hello! I am using for the first time the JTabbedPane. The problem that I have is that I want to apply the paint method only for the first tab, but it also paints the second one. How can I solve this problem?

Member Avatar for stultuske
0
112
Member Avatar for Lindsey1211

Hi, So i'm trying to write a program that will work like a credit card database. The instructions say to add a file with 10,000 names that was given to us and add it to our project file. a scanner is suppossed to read through that file and add each …

Member Avatar for stultuske
0
283
Member Avatar for Qonquest

I'm going through a netbeans tutorial on Java ecommerce located here: http://netbeans.org/kb/docs/javaee/ecommerce/setup-dev-environ.html When I get to "running the web project, step 1", I click the green run button in the NetBeans IDE. In my browser, it goes to http://localhost:8080/AffableBean, but no HTML is displayed. If I view the admin domain …

Member Avatar for javanoob101
0
190
Member Avatar for riahc3

Hello Dont ask why but lets say I want to encrypt "hello" and the encrypted forum is "238324" I want to do: String avariable=dcrypt(238324); //avariable should now hold hello public string dcrypt(String encryptedtext) { //do decrypt stuff return descriptedtext; //decriptedtext should be hello } Basically thats what I want.....Dont care …

Member Avatar for JamesCherrill
0
718
Member Avatar for Lindsey1211

Hi, Im trying to write a program that uses a .txt file to fill an arrayList of type Customer (A class that I made.) and then using that ArrayList to perform other functions within my Customer Database class. when I test my method, nothing is being added to the ArrayList …

Member Avatar for javaAddict
0
187
Member Avatar for PreethiGowri

I have written a code which used to send data that was saved in my mysql database, through ethernet using UDP protocol, everything worked fine until i sent fewer data(25 rows), when i started sending data in huge amount(100 rows) it used to display Java Result: -1073740791 and would stop …

Member Avatar for PreethiGowri
0
327

The End.