473,554 Members | 2,331 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Java Forum

Java programming language (Sun Microsystems) - Ask questions about java programming, OOP, JRE, SDK, Swing, Plugins, Java Virtual Machine(JVM), Java Libraries: Collection, XML Processing, Security, JDBC, JNDI, RMI, CORBA, AWT (GUI) and more.
13
4,493
thread by: giorgos113 | last post Dec 14 '06 by: DeMan
Can i have a tic tac toe java code pls.. thnx!
13
4,531
thread by: rajbala | last post Nov 17 '06 by: horace1
hi all, this is my program ...... By this need to change my port again and again ..... will you help me to proper closing of socket...... code: <%! ServerSocket MyServer; Socket Mysocket;
13
9,095
thread by: huiling25 | last post Dec 11 '06 by: r035198x
I have a text file, i open the file and try to match the contents of the text file to a text. Here's my code: FileInputStream input = new FileInputStream ("BinaryFp.txt"); BufferedReader br = new BufferedReader(new InputStreamReader(input)); for(int i=1;i<801;i++) { pdtNo = br.readLine(); if(pdtNo=="M5250") System.out.println("true");...
13
61,487
thread by: prileep | last post Jan 18 '13 by: Ungihan
if i use java.util.Random i can create random numbers. But how do i can define a Random object that its methods like nextInt() should return between two specified numbers(Eg: i want to create random numbers between 100 and 200)
13
10,324
thread by: Naha | last post Feb 15 '07 by: r035198x
Hi Guys, I have managed to write a java class which opens and reads a text file and prints the data onto a webpage. however in order to do this I have to compile my java class each time. Does any one know how I could do the same thing using servlets and jsp, I have been trying to do it, but have not succeeded yet.
13
47,622
thread by: marvinp | last post Sep 28 '12 by: edk2
I am writing a class which contain a variable INFINITY. Is there any constant defined for this in java so that i can assign that value? In .NET, there is System.Threading.Timeout.Infinite for infinity. I am looking for the same in java also.
13
1,406
JavaStudent07
thread by: JavaStudent07 | last post Mar 15 '07 by: JavaStudent07
I am trying to test a character for being the "Enter" key, I figured to test it if(DataBits!=null) { stuff } like that, but i got H:\>c:\j2sdk1.4.1\bin\javac.exe BubbleSort.java BubbleSort.java:68: operator != cannot be applied to char,<nulltype> if(DataBits!=null) ^
13
32,431
thread by: shiniskumar | last post Apr 4 '07 by: shiniskumar
Ive got a collection that is populated by some key/value pairs. How can i iterate ie to get its each key/value pair?
13
1,953
oll3i
thread by: oll3i | last post Apr 9 '07 by: JosAH
private List<Klient> klienci; m_add_client.addActionListener( new ActionListener() { public void actionPerformed(ActionEvent e) { try{
13
3,399
BSCode266
thread by: BSCode266 | last post Apr 10 '07 by: hirak1984
Hey all, I was kinda wondering about how many people here have actually used or are using the Model-View-Controller-model. Is it really usefull? for those who wonder what MVC is: http://en.wikipedia.org/wiki/Model-view-controller BSCode266
13
2,413
thread by: delram | last post May 17 '07 by: r035198x
Hello All! I've been struggling with this problem for a while. I have a database from which I need to read and display some data on a browser. (The database is set up for remote access). I'm using the following JSP/JDBC code to do that. ---------------------------------------------------------------------------------------------- ...
13
5,216
thread by: mavishster | last post May 23 '07 by: emekadavid
hi everyone. i have to write a prog that divedes words on syllables for one language. the algoritm itself is ok.i take from user the string convert it to char string make the operation and put it to new string with difined size,but then the new string is displayed (and it is shorter than strings length) the empty spaces show squares. how can i...
13
20,437
thread by: Nirmala123 | last post Jul 13 '07 by: itsraghz
Hai everybody, how can i redirect tomcat console output into a text file. I want to print all the error output into the textfile.Help me, thanks in advance......
13
1,634
madhoriya22
thread by: madhoriya22 | last post Jul 24 '07 by: lhopeusa
Is there any collection in which we can have two keys for the same value?....Like in HashTable we have key k1 for value v1 I want it like key k1, k2 for value v1
13
1,714
thread by: naik | last post Jul 12 '07 by: praveen2gupta
hi everyone my teacher ask bout one prg is here? class Outer { static int x; class Inner { static int y; public static void main(String args) { System.out.print(x+" "+y);
13
5,883
thread by: max3 | last post Jul 17 '07 by: jkmyoung
Hi,can somebody help me, I am trying to compile a programm but have an error it is called reached end of file while parsing?? Anyone mind th have a look for some help public class records { public static void main (String args){ System.out.println("Enter name"); float name = Keyboard.readInt(); ...
13
4,790
thread by: no1zson | last post Jul 30 '07 by: no1zson
I am a beginner here, still in my first Java class, so I hope this question is not so simple as to offend anyone, but I am finishing up my cd inventory program. Adding some GUI buttons to manipulate data in my JList. JList is beyond the scope of my class so I am finding help hard to come by. I only have two weeks of class left, so it is too...
13
1,522
thread by: spicster | last post Aug 23 '07 by: Nepomuk
I need help with finding an entire inventory value for a java assignment. This is what I have so far. I am new to Java and am struggling. In need of help, thanks import java.util.Scanner;//program uses class scanner public class ProductInventory1 {//main method begins java application public static void main (String args)
13
5,316
thread by: deepthisoft | last post Aug 30 '07 by: JosAH
hai, I want to convert String to int.My coding is like this, rs=stmt.executeQuery("select a from mailtable"); rs.absolute(-1); String id=rs.getString("a"); System.out.println(id);
13
2,535
thread by: kinghippo423 | last post Sep 5 '07 by: JosAH
Hello Everyone, I did a poker program in Java that essencially finds the strenght of a poker hand created Randomly. My program is doing OK...but I'm pretty sure it can be optimised. This is my results with 1 million hands: Number of hands generated : 1000000 Straight Flush : 0.0012 % In theory : 0.0012%
13
5,167
thread by: Kakarla Durga Prasad | last post Sep 14 '07 by: Nepomuk
i want Java program for additin of two numbers with out using any Arithemetic operator.
13
2,481
thread by: sigmundccs | last post Sep 17 '07 by: kreagan
Write a program to load in two integers from the user. Display all the prime numbers between the two integers. i'm a beginner. i'm problem doing this. can anyone teach me ? thanks a lot.
13
14,572
thread by: ajos | last post Sep 18 '07 by: r035198x
hi frnds, im doing some db related operations in my web project,im using mysql 5.0,i have the following piece of code in my action class- for(resultset = statement.executeQuery(s2); resultset.next();) { s10 = resultset.getString(1); s11 = resultset.getString(2); s12...
13
1,851
thread by: sugard | last post Oct 9 '07 by: sugard
Abstract Class, Inheritance, Polymorphism, File Handling, Exception Handing A program is to be devised for a university to work out whether or not, a student or a professor, is outstanding. The criterion for a professor to be outstanding is to have over 120 publications. The criterion for a student to be outstanding is to have a Grade Point...
13
1,770
thread by: carlos123 | last post Nov 1 '07 by: carlos123
ok the following code , is the code for my program, basicly, i use bluej, so i can just copy and paste some code into the forums and someone else can copy it in to their editor, so basicly i want someone to show me how to make this set of code to be able to run itself, i have marked the main areas of the code like the main and graphics panel etc...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.