32,204 Topics
| |
hello, i have an educational compiler construction project that does not have to be hectic but a simple one using java to construct the compiler. It has to compile some of the set of java language, libraries, objects, and controls. it also requires all facets of a standalone compiler (parser … | |
hey can anyone help me out......... I am trying to connect 2 processes on a single computer using socket programming in java....how can i connect such 2 processes....pplllzzzz help me out | |
[URL="http://sourceforge.net/projects/pmd/"]http://sourceforge.net/projects/pmd/[/URL] [QUOTE]PMD is a Java source code analyzer. It finds unused variables, empty catch blocks, unnecessary object creation, and so forth.[/QUOTE] I've been tasked to write customised rules to find the following: [LIST] [*]Instances where Double.ValueOf was used to parse a string to a double [*]Instances where Float.valueOf was used … | |
Hello. I am working on a little Java project and have gotten a little stuck. May I have a little help please? First the original class and then the test class code here. Thanks!! [CODE]public class PhoneBookEntry { private String name; private String number; PhoneBookEntry(String string, String string2 ){ } … | |
hi all i have start working on java rmi currently.i using this tutorial to write my first java rmi program. [url]http://www.javacoffeebreak.com/articles/javarmi/javarmi.html[/url] i started the rmiregistry.then i compile server file and generate the stub file using rmic.Now when i am running the server using java command it is giving following exception … | |
Hi All, This is the first time I'm using Java to connect to my online MySQL database that is hosted by a separate web host. Following is the code in use: (I've removed the server url, username and pass for obvious reasons. They all work when I use them in … | |
Hello. I am trying to make a program that has a menu. When you click play , it should (for now) output the text "In Game". It does that. However, it prints the text on a new JFrame. I would like it to print it on the same frame. How … | |
I have seen in many servlets that doPost and doGet are declared public or protected. What is the purpose of declaring a doPost or doGet as protected? Thank you. | |
Hi, I have got a problem which has left me banging my head against the wall. Anyways, here is my situation. I've got to scan for a directory continuously and as soon as I've got a CSV file in it. I need to process that CSV file and pass on … | |
Hello, For some work I have to implement the selection sort algorithm on an array list, I dont really know how to do this. I have started off the code but I just need to actually implement the selection sort! This is proving to be the stumbling block. Here is … | |
I've been trying to create a Hangman game in Java, and I have a string that looks like "_____" for a certain number of letters that they are supposed to represent. How would I replace just one of those, rather than all? I've heard that you can't replace an underscore … | |
hello friends, I got a problem with an object array.I'll write a sample code for understand the problem.I declared an array of objects named item. [CODE]item[] itemAr = new item[100];[/CODE] And then I initialized some of them [CODE]itemAr[0]=****; itemAr[1]=****; itemAr[2]=****;[/CODE] I want to know that is there a way to … | |
Im having trouble implementing my own ordered linked list from scratch. [CODE] public class LinkedList{ Node head,tail; public LinkedList(){ head=tail=null; } public LinkedList(Node node){ this.head=new Node(node.num); this.tail=new Node(node.num); } public static void main(String[] args){ LinkedList list=new LinkedList(); list.insert(new Node(7)); list.insert(new Node(3)); } public void insert(Node node){ if(head==null){ head=node; tail=node; } … | |
Dear All, I have an application where I got few different sql queries that I would like to have an ACID properties. I have now setAutoCommit false. Where best to put commit and rollback statement? [CODE]try { [INDENT]dbconn = DriverManager.getConnection("jdbc:mysql://192.168.1.45:3306/***?"+"user=****&password=*****"); dbconn.setAutoCommit(false); stmt = dbconn.createStatement(); String selectQuery2 = "Select * from … | |
I work on ubutnu 10.10 and have java installed on my machine ( jdk 1.6.0) cause when I type java -version on terminal ,it gives me the details.But when i try to open eclipse , it says no jre or jdk found etc, .Please help. | |
Hey guys I need a little bit of help. I am writing a program that generates 100 random numbers and then stores then in an arrays (2, even and odd numbers) I need a little help with passing the array into the function and generating random numbers. What am I … | |
Hi guys, I'm currently switching from mechanical engineering to Computer Programming analyst in September so I have a few months to learn how to do this.. What I want to do is make a Bot for a game.. The game is written in Java and I want to load it … | |
[code] import java.awt.event.ItemEvent; import java.awt.event.ItemListener; import javax.swing.DefaultCellEditor; import javax.swing.JComboBox; import javax.swing.JFrame; import javax.swing.JScrollPane; import javax.swing.JTable; import javax.swing.table.DefaultTableModel; public class main implements ItemListener { String[] a = {"one","two","three"}; String[] b = {"4","5","6"}; String[] c = {"7","8","9"}; String[] d = {"10","11","12"}; String[] e = {"13","14","15"}; JComboBox a1 = new JComboBox(a); JComboBox b1 … | |
Im trying to make a calculator and I thought of using the ScriptEngine class to evaluate expressions. So I designed the following code: CalculatorFrame.java : [CODE] import java.awt.*; import java.awt.event.*; import javax.swing.*; import java.lang.Math; import javax.script.ScriptEngine; import javax.script.ScriptEngineManager; public class CalculatorFrame extends JFrame { public CalculatorFrame() { setTitle("My Scientific Calculator"); … | |
Hi everyone, I am new in Java programming. I want to know that how to check integer variable whether it is null or not. I have a situation I write a program that asks that how old are you. If a person accidentally press enter and does not put a … | |
Hello, i'm here to ask you for some help, i have done several applications/games in different programing languages, most of them without planification. For example,i wrote a five-in-a-row game in C++ with A.I (simple heuristic functions) without making sketchs or things like that, i started programing just to see what … | |
when i click on a column on which editor is attached , the getselectedrow return -1 ...... I have also tried list selection listener but nothinhg work properly.... i dont think it need code.... Please help..... | |
Hi The error I stated in the title appears when I try to run the following code in Eclipse. I have created the Table which is named as "Emp" in Microsoft SQL Server. I can't find the error I have done here, and I googled but nothing helped me.. Plz … | |
Hi, I have problem deploying ear's in jboss application server. I have a ear, which has the this structure test.ear /META-INF /dependency jars When i deploy this application under non scoped isolation, it works fine but i want my application to be deployed in scoped isolation. The exception what i … | |
Hey guys, i've been trying to clone pokemon in java but i've come across a very weird problem. [CODE]java.lang.VerifyError: (class: attribute/base/health/AbstractBaseHealth, method: <init> signature: ()V) Constructor must call super() or this() at actor.pokemon.AbstractPokemon.<init>(AbstractPokemon.java:44) at actor.pokemon.charmander.AbstractCharmander.<init>(AbstractCharmander.java:16) at actor.pokemon.charmander.ConcreteCharmander.<init>(ConcreteCharmander.java:11) at main.Main.<clinit>(Main.java:17) Could not find the main class: main.Main. Program will exit. Exception … | |
Hi! I am having problems with my login form. So I created a database for my login form so that i can create multiple user. That works fine but when I try to log in the user created an error shows: Error: [CODE] java.sql.SQLException: No row count was produced at … | |
I am confused with the optimized quick sort little help please [CODE] public static void quickSort(int []A,int p,int q){ while(p<=q) { int r = partition(A, p,q); quickSort(A, p, r); quickSort(A, r+1, q); } } static int partition(int []A, int p, int q) { int a=A[p]; int lp=p-1; int rp=q+1; while(A[rp]<a) … | |
Hello. I need to reproduce this pattern using one main for loop and one nested for loop. I cannot seem to figure out the right way to do this. I came close, but not close enough. 0 10 210 3210 43210 543210 6543210 76543210 876543210 9876543210 [code]for (int x = … | |
Hi is it possible to use static variables with servlet. I want to access static variable from servlet but it gives null value. Why?? |
The End.