32,199 Topics

Member Avatar for
Member Avatar for mgold

First, just to clear this up, I did not post this is the wrong place. I know the difference between "Java" and "Javascript" I'm working on a project where I want to allow a simple, no intense programming required, way for users to create custom functionality. This is a simplified …

Member Avatar for JamesCherrill
0
370
Member Avatar for javaprog200

Hello, In the following programs, I am trying to add multiple clients. The Client program remains unchanged. For the Server program, I am using a thread (custom class implements the Runnable interface) to open a new socket and process every client request. My questions follow the programs. **ChatServer.java:** import java.net.*; …

Member Avatar for franko1990
0
4K
Member Avatar for Twee Nguyen

I just begin studying Java programming language and I want to solve cubic equation, but I do not know how to solve it and count the cubic root in java. Could you help and guide for me, please?? Thank you so much!

Member Avatar for JeffGrigg
0
138
Member Avatar for woomar

Hi. Everyone. I have a single-linked list and I need to implement an add method. I need to traverse the list (it needs to be in increasing order) and place the parameter object inside. There won't be duplicates. How do I go about doing this? public void add(G element) { …

Member Avatar for JamesCherrill
0
153
Member Avatar for solomon_13000

Instead of using synchronization, I used AtomicReference as a substitute: private AtomicReference<HashMap<String,String>> a = new AtomicReference<HashMap<String,String>>(); public String initPool(HashMap<String,String> latest){ HashMap<String, String> old = a.get(); if(old!=null){ Set<String> key = a.get().keySet(); for(String val: key){ if(!latest.containsKey(val)){ a.get().put(val,latest.get(val)); return returnObj(val); }else{ return returnObj(val); } } }else{ a.compareAndSet(old, latest); return null; } return null; …

Member Avatar for JamesCherrill
0
150
Member Avatar for durgesh1

hello friend i like to make program in which user can selecte product and they can choose on e or more product by clicking add button now i want to save this firstly temporary all selected product when they click on add button and when user click on submit it …

Member Avatar for StephenHero
0
169
Member Avatar for sulfurid

Hi, i just want to finish my j2ee application that have to receive many sms from mobile users of network operator and store these on database. I try to google it but i found nothing about this. Please, i just need an orientation step by step (Excuse me for my …

Member Avatar for StephenHero
0
193
Member Avatar for pspwxp fan

Hi all, I have been told that variables containing objects are basically just references to a memory locations that contain the object data. And doing something like this: TestObject o1 = new TestObject(..); TestObject o2 = o1; would make a new variable o2 that will simply point to the same …

Member Avatar for JamesCherrill
0
127
Member Avatar for MrHardRock

Hey guys I had an assignment to recursively write the Towers of Hanoi then test it. I did not have too much of an issue getting the program written But I am not sure what the book means by test the efficiency do they want the number of moves my …

Member Avatar for stultuske
0
904
Member Avatar for iTechnnn

Hello, im having problem with my output =/ Everytime i run my program is not giving me the right output so, this is my assaigment. Consider a class that keeps track of the sales of an item. An object of this class will have the attributes: Number Sold Total Sales …

Member Avatar for stultuske
0
2K
Member Avatar for sirlink99

I am having a problem deleting nodes from my Binary search tree. What I have so far does part of what it is supposed to do. I read in an input (paragraph of text) to create the tree (organized via ASCII character values). I make it, then print out all …

Member Avatar for sirlink99
0
302
Member Avatar for lizzy2

Hi, I am working on a program that prompts the user for answers to a quiz. The answers can only be a, b, c or d and they are saved to an array which I later compare to my answer key array. Below is the method I have written to …

Member Avatar for lizzy2
0
1K
Member Avatar for somjit{}

I saw a tutorial from a site where it showed the use of `ArrayBlockingQueue` as a thread-safe concurrent data-structure . Just for learning purposes , i tried to build something similar using synchronized and wait-notify methods in java. I'm hoping someone could guide me to some improvements and point out …

Member Avatar for ~s.o.s~
0
207
Member Avatar for parul.arora.92505

hey fellas I m new to mobile agents please help me in developing addition program in aglets. Thankyou .

Member Avatar for JamesCherrill
0
60
Member Avatar for orca_lee

Hi everyone, Hope u all in good shape. I'm doing a simple project integrating mobile agents using aglets with intrusion detection system using snort., all these are done with linux fedora core 5 platform. The basic idea is, when snort detect an intrusion, an aglet will read the log file …

Member Avatar for stultuske
0
443
Member Avatar for mohammedfae

Hello dear friends I am developing an application in java and in part of it i need to implement RSA encryption alogorithm that can encrypt any form and size of files ... can someone please guide me to an implementable code of RSA ?

Member Avatar for mohammedfae
0
3K
Member Avatar for eijnar

how can i create this pattern in a java loop with the use of input. for example input is x = 5 y = 6. this will be the output. ***** * * * * * * * * ***** I've tried different code but it gets me to full …

Member Avatar for IIM
0
219
Member Avatar for MONTS

import java.io.EOFException; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; import java.io.OutputStream; import java.io.Serializable; import java.util.ArrayList; import java.util.Scanner; class Record implements Serializable { int roll; String name; public void setData() { Scanner scr=new Scanner(System.in); System.out.println("Enter Roll Number: "); roll=scr.nextInt(); System.out.println("Enter Name: "); name=scr.next(); writeData(); } public …

Member Avatar for Seldar
0
193
Member Avatar for edet4krist
Member Avatar for Edward_2

Write a Java program that will allow a user to calculate interest on a Bank loan. The program should i.Display Bank’s name and loan types available (at least 3). ii.Accept user’s choice of loan iii.Ask for user’s account number and verify. iv.Display Account name associated with account number to confirm …

Member Avatar for JamesCherrill
-2
435
Member Avatar for softswing

Hi Please help me in this problem. I want to run xml request by java code without using soap ui, please suggest me is it possible in java? how can i implement?

Member Avatar for IIM
0
100
Member Avatar for zunairah

i have a java client and c# server the server code is static Socket listeningSocket; static Socket socket; static Thread thrReadRequest; static int iPort = 4444; static int iConnectionQueue = 100; static void Main(string[] args) { Console.WriteLine(IPAddress.Parse(getLocalIPAddress()).ToString()); try { listeningSocket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp); //listeningSocket.Bind(new IPEndPoint(0, iPort)); listeningSocket.Bind(new IPEndPoint(IPAddress.Parse(getLocalIPAddress()), …

Member Avatar for JamesCherrill
0
208
Member Avatar for JamieVern

Hello, All. I'm a beginner with Java writing and would greatly appreciate a hand with the problem below: A student has decided to fly his remote controlled airplane. The airplane has about 12 minutes of flight without any extra weight. For every 1/2 of a pound added, the lifetime of …

Member Avatar for Schol-R-LEA
0
209
Member Avatar for mikewyatt

I have 5 image files that I wish to incorporate or embedd inside a program. I am using netbeans and I have created a directory in the files table just under the database directory (I have embedded databases) with the 5 files inside them. For good measure, I have also …

Member Avatar for JamesCherrill
0
152
Member Avatar for Ann aiko

import java.awt.*; import javax.swing.*; import javax.swing.JComboBox; class grid extends JFrame { String[] Sex = {"Male", "Female"}; String[] Day = {"1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "30", "31"}; …

Member Avatar for mKorbel
0
114
Member Avatar for somjit{}

Remember High-school maths ? there was this greek letter Sigma ( if i remember correctly ) , followed by an algebraic function like `f(n)` , where `n = a to b` would be short-formed as `a` below the `sigma` , and `b` sitting on top of it. I want to …

Member Avatar for somjit{}
0
792
Member Avatar for anisha.silva

Hi, I am new to the eclipse plugin developement. I want to create an launch button (eg: Run, Debug button). the only link that I found was http://www.eclipse.org/articles/Article-Launch-Framework/launch.html and it is difficult to understand. could some one point to a tutorial that is explained more appreciate a response Thanks

0
140
Member Avatar for Benjamin_4

hello guys, i have created a jform which contains these field; ComboBox_decCode(description code) ComboBox_itemCode(item code) combo_Area(Branch_Area) ComboBox_dept(Branch_Code) txt_sn(Serial Number) i want to generate a serial key based on these information in my database. Description Description_Code --------------- ---------------- Lands & Building LB(001) Branch_Area Branch_Code ------------ ------------- Labone LB(001) now the idea …

Member Avatar for Benjamin_4
0
148
Member Avatar for Ann aiko

![3b819887a764833c3e81f2ec2e1812d5](/attachments/large/4/3b819887a764833c3e81f2ec2e1812d5.JPG "3b819887a764833c3e81f2ec2e1812d5") ![3b819887a764833c3e81f2ec2e1812d5](/attachments/small/4/3b819887a764833c3e81f2ec2e1812d5.JPG "align-right") ![d7a3344f965976e589fb6c6848d8d9e0](/attachments/small/4/d7a3344f965976e589fb6c6848d8d9e0.jpg "align-left") import java.awt.FlowLayout; import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.JTextField; import javax.swing.JComboBox; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import javax.swing.JButton; public class OtakuHigh extends JFrame{ private JLabel label, label1, label2, label3, label4, label5, label6, label7, label8; private JTextField text1, text2, text4, text5, text7, text8; private JComboBox Mbox, Dbox, …

Member Avatar for Ann aiko
0
174
Member Avatar for nikolaos

One thread increases an integer named "counter" , and another decreases the same integer. Using synchronized statement on LockObject to control access to counter. If i understand correctly i have to use an Object reference. Can i use synchronized statement on counter somehow? public class Synchronized_Block_Demo { public static int …

Member Avatar for nikolaos
0
341

The End.