32,204 Topics
| |
Is it possible/compatible to use Session Types in Java for a cloud-based application using Windows Azure (SDK for Java)? | |
import java.util.NoSuchElementException; import java.util.Stack; public class StackList<T> implements SomeList<E>{ /* Comments * only use offer(), poll()/remove, isEmpty(), and size() methods*/ private Stack<T> stack=new Stack<T>(); public StackList(){ Stack<T> stack=new Stack<T>(); stack=stack1; } public void push(T thing){ stack1.push(thing); } @Override public T pop(){ if(this.isEmpty()){throw new StackOverflowError();} return stack1.pop(); } @Override public void … | |
I am trying to update with this code Result.updateInt("bank_ac_no",Integer.parseInt(acnotxtfield.getText().trim())); //this is the line I'm getting error. Here is the Trace java.lang.NumberFormatException: For input string: "2737383928291819" at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65) at java.lang.Integer.parseInt(Integer.java:495) at java.lang.Integer.parseInt(Integer.java:527) What's wrong? | |
i want to write a function which calculates the Monthly depreciation and accumulation of an asset but i am having difficulties writing it to calculate and insert it into my datebase.I will appreciate the help private double getAccumulation(){ double Accumulation = 0; double Monthly_Depreciation; int Estimated_Useful_Life = Integer.parseInt(eul.getText()); double Cost_Of_Acquisition … | |
Is java a platform Independent language. I think its no? My question is in what respect java is totally platform dependent. Is there any case? Share with Us. I have seen this question. So please reply quickly. Java is probably one of object oriented programming. Does it purely object oriented … | |
Hello, what is the meaning of System.exit() ? if System.exit(0) = close the program without error But, what is the meaning of System.exit(1) ? Is there is any System.exit(2), System.exit(3), etc ? Thanks you | |
I'm trying to create a list stack that implements some interface called SomeList The list stack should only use stack with no links. the itnerface has a number of methods that I would like to implement. So for SomeList I have something like public interface SomeList<T>{public void plus(T something);public E … | |
(Total Sales) Use a two-dimensional array to solve the following problem: A company has four salespeople (1 to 4) who sell five different products (1 to 5). Once a day, each salesperson passes in a slip for each type of product sold. Each slip contains the following: a) The salesperson … | |
/* * GUI Electric Bill Program */ package guielectricbill; //import the package to do GUI input/output import javax.swing.*; public class GUIElectricBill { public static void main(String[] args) { // declare variable to store user input String accountNumber, customerName, address; int KWH; double amountDue; // Welcome customer to the Electric Bill … | |
Can someone please tell me why I keep getting a stack overflow when I try to create nodes in a priority queue? class Node { public int frequency; // data item (key) public char character; // data item public Node leftChild; // this node's left child public Node rightChild; // … | |
Hi, How do i debug an eclipse plugin project? When I go to the MANIFEST.MF file- > Testing section - > Launch an Eclipse application in Debug mode,it starts debuggin the worspace code. I havent any breakpoints in the workbench code. how to i avoid this. appreciate a response thanks | |
i want to get the value for Accumulation but it returns no value. Any help with resolving it will be appreiated private double getAccumulation(){ double Accumulation = 0; double Monthly_Depreciation; int Estimated_Useful_Life = 5; double Cost_Of_Acquisition = 2000; double Estimated_Residual_Value = 500; try{ Monthly_Depreciation = (Cost_Of_Acquisition - Estimated_Residual_Value)/Estimated_Useful_Life; Accumulation += … | |
Hi all, as much as I don't like the API, it is becoming more and more important for me to start using it. I think I might need a guide of some sort which says what's what and what's where, if anybody has one please let me know. Today I … | |
In the following example two threads share int counter. The increment_thread thread increases counter by one . The decrement_thread thread decreases counter by one . I use semaphore to control access to counter instead of making the two methods synchronized. Is this the proper way of using semaphore? When should … | |
i want to develop a web base project. if any one have some web based project names plz give me. | |
Hello Professionals out there, i am making a point-of-sales systems in java. And i have a jTable named "tbitempurchase" wherein I add the ordered items using an add button.I also have a table in mysql database named "itemSold". Now my problem goes like this, I want to insert the data … | |
hi guys, i try write this java code in php using php java bridge: http://www.lucenetutorial.com/lucene-in-5-minutes.html when i found this line: IndexReader reader = DirectoryReader.open(index); i dont get it how to write it in php. i've tried but error result. when it be like this: Query q = new QueryParser(Version.LUCENE_40, "content", … | |
Hi, Not sure if this the correct forum to post this question. I would like to know how to implement code completion for an editor in the eclipse plugin project. I created a multiPageEditor and now I am tring to implement code completion. I was not able to find a … | |
Goodday The first random number working set is a set of 3 different integers from the range 2 to 7 The second random number working set is a set of 4 different integers from the range 4 to 22 Each of these working sets may be generated as many times(at … | |
Hi every body I want to build a graphical user interface for my project and i need to provide the facility for the user to draw as many as some predefined shapes (rectangles, ovals, ...) as she wants and connect them with lines. she should be able to delete the … | |
Hi I have a three folders i have compressed all the folders using jar. I want to access one of the java file inside jar file that is actually inside one of the folders to start the application. | |
Hi. I was wondering how I could replace objects in a list without using a single loop. Here's what I have in terms of algorithm; but, I don't know how to implement.: replace(List list, oldObject, newObject) 1. if the first element in list is not null 2 if the old … | |
Dear All, I have studied in my book that after compiling the RMI server it will produce two Class files RMIServer_Skel.class RMIServer_Stub.class But I have succesfully ran the RMI server and made the client connection, but i could not find any Stub or Skeleton files in my workspace. Why is … | |
Hello all - I am writing a Depth First Search program in java for the eight puzzle problem. I have completed the coding but for some reason I am not able to print the exact depth at which nodes are being searched. Here is two of the methods that does … | |
I am writing an asset monthly depreciation system and i have written a code which works but i want to set the values such that the user enters the value manually into the system. Currently the values have been declared with a variable. this is my code // declare an … | |
Hello, i just started learning android and i thought to make a simple app by providing a simple rtmp url si i can play the video on android device but i cannot fine suitable tutorial to start with i tried following this link http://www.jwplayer.com/blog/24717/jw-player-59-html5-now-default-on-android but its not online anymore thank … | |
Hello, all. Attached is a simple (for most) program that I'm working on. | |
Hello, all. I'd greatly appreciate some assistance in getting this program working properly. Thank you! | |
Hi guys I want to develop a pattern recognition system for my final year project. The system will be an interface between a blind person and a mute person; I have chosen android platform for the system as most smart phones use it. I want the smart phone to use … | |
Dear Team, I have decided to prepare for Oracle certified Java Programmer certification. When i searched in Oracle site, It showed two certifications for OCJP. 1. 1Z0-851 (Java SE6) 2. 1Z0-804 (Java SE7) For the the second exam which is 1Z0-804 they mentioned, we need to pass two exam first … |
The End.