32,204 Topics
| |
hello everyone I learned jsp and servlet, now i wanted to develop a project which not only i shows as major project in my college but also want to learn real time development. If it possible for you give me an idea/ specification(contains Jsp, Servlet/Spring or more..) then i shall … | |
Going back to the grocery line queue. At the end of the program, it will output how many total customers I serviced, and it is supposed to output my maximum line length during the simulation. I think its obvious that I will use an "if" statement, but how do you … | |
Hello everyone, I am working on a program that takes an input from a user and then tests whether it is a binary number or not. If it does not contain only 0's and 1's it prints out not a valid binary number. The part I am confused about is … | |
Hello, I want to convert a plain text string to binary data so that the readable text is no longer visible, however certain programs can interpret the binary data properly. Something like when we compile a program into a class, the code is no longer readable, but JVM can still … | |
Hello everyone! I'm currently having a problem with my program it doesn't loop properly please help me with it. The code is below. Thanks in advance! import java.util.Scanner; import javax.swing.JOptionPane; import javax.swing.*; public class Wewe{ public static void main(String[]args){ Scanner inp = new Scanner(System.in); boolean tryAgain; do{ System.out.print("\nInput username: "); … | |
I want to count the number of times the button is clicked using GUI. I did this code: private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) { int clicked = 0; clicked++; System.out.println(clicked); } But it showing the output "1", each time I click the button. I want every time I click the button … | |
package tamirnfasle2; import java.util.Scanner; public class Tamrine4 { private int number; Tamrine4(int n) { number=n; } public void Calculate() { float sum=0.0f; for(int i=1;i<=number;i++) { i=1/i; sum=sum+i; } System.out.println("Sum Reverse Number Between [1," + number + "] Is :" + sum); } public static void main(String [] args){ Scanner inputNumber … | |
Hey everyone, I just need a little help with a lottery program I have to make or class. I have to generate a 7 digit number and then using that number compare it to a guess the user enters. I need to award prizes for the following conditions. 1. if … | |
It's surprisingly how little documentation `java.io.InputStream` has for a class of its complexity and importance. Almost every Java application uses it in one way or another, but how one uses it correctly is not completely spelled out. Naturally the documentation allows most of the methods to throw an `IOException` if … | |
HI all, I am a bit confused about right justifying and formatting strings and numbers in general, and I was wondering if somebody can clarify this for me please. Ok, so let's take an example: // Fig. 7.2: InitArray.java // Initializing the elements of an array to default values of … | |
Hello everyone, I am trying to make a chat application. For this i have made two programs-SERVER and CLIENT. But these are connecting. import java.io.*; import java.net.*; public class SimpleServer { public static void main(String args[]) { ServerSocket s=null; try { s=new ServerSocket (6666); } catch(IOException e) { e.printStackTrace(); } … | |
hello.. can someone show me how to view html code inside pdfptable using itext | |
hi.. I'm trying to read a .docx file using apache poi api methods.. But i'm facing a few problems.. Can anyone suggest me the changes to be made in this code?? package apiole; import java.io.*; import org.apache.poi.xwpf.extractor.XWPFWordExtractor; public class Apiole { public static void main(String[] args) throws IOException { File … | |
I am calling a Stored Proc in Oracle using Hibernate. Procedure: create or replace procedure GetStocks(email in VARCHAR2) is BEGIN execute immediate 'SELECT * FROM stock WHERE email=email'; END; Java Code Query query = session.createSQLQuery("CALL GetStocks(:email)").addEntity(Stock.class).setParameter("email", "abc@xyz.com"); System.out.println("QUERY:"+query.toString()); System.out.println("QUERY SIZE:"+query.list().size()); List result = query.list(); for(int i=0; i<result.size(); i++){ Stock st … | |
Hello. I wrote a program and loaded a lot of data : dir,files,serialized frame etc. I used it and found updates to add so I changed the class so to speak by making the changes. Now of course the same serialized frame will not open so I can not access … | |
Need some assistance with this program. Don't know what I need to do. import java.io.*; // Needed to open and modify binary data public class FileEncryptionFilter { public static void main(String [] args) throws IOException { // An array to write the file int[] numbers = { 2, 4, 6, … | |
I am trying to figure out the best way to approach this..... I am creating a grocery line simulation using a queue, and I know that I will want to create a Customer class that has the information for serviceTime. I am weak on creating classes, what I want to … | |
Hello ! I'm developing a WebApp using [this example](http://www.primefaces.org/showcase/ui/datatableRowSelectionByColumn.jsf) where I: 1. Connect to MySQL and download data. 2. Populate dataTable with downloaded data using. 3. Fetch(view button) the record and display its details in a dialog. Problem begins when I download the records and click on the viewButton(no matter … | |
For example let's say we have the property called Customer that returns a value of name String name; <== Global Variable public String getName() { return name; } public String setName(holdingName) { name=holdingName; } and a constructor called Match public FullName(String realName) { holdingName = realName; } Can I do … | |
im having trouble displaying the 10 most common word pairs. im sure it is just a matter of sorting and taking the data but i am unsure on how to do this? private static void generateOutput() { for(Entry e : result.entrySet()) { System.out.println("Symbol: " + e.getKey()); Map<String, Integer> count = … | |
So here's my code. I had to do 3 constructor and 2 division methods. I have finished the 3 constructors. My question is on the division, where :(1) I have to divide a fraction by an integer and return, (2)divide an integer by a fraction and return. public class IFraction … | |
hi everyone..can u please help me with my project? server to client quiz using java... please.. i really need it.. | |
Hello Im having problems removing the ALT+0160 character from a string. iswhitespace doesnt seem to work. How can I manually remove it? | |
im learning some algorithms , and trying to come up with a version for Quick find using union find. the algorithm works like : 1. get user input for size of the array (the array holds the data on which quickfind will work) 2. create and initialize the array based … | |
Hi, I'm planning to join in a new company as a Java Developer. I have few months of experience only. However, I'm planning to tell the company that I have 1 year of experience. Because in the company they don't consider people who have less than a year of experience. … | |
//compute percentage for Parent1 DecimalFormat df = new DecimalFormat("#.##%"); rs = s.executeQuery("SELECT " + "(SELECT COUNT(*) FROM genetic.blood_type where diseases = '" + disease1 + "')" + "/COUNT(*) AS rowcount FROM genetic.blood_type where btype = '" + btype1 + "'"); rs.next(); int result = rs.getInt("rowcount"); rs.close(); out.println(disease1 + " is … | |
hi ... i want to send to MMS/SMS from PC(mobile phone connected via Usb cable ) to any mobile number at remote side using [B]GPRS[/B] connection. this is a one module of my Final year project. please any one know any library in JAVA or C++ who works this, kindly … | |
Hey everyone, I have been assigned to create a recursive maze program and I am having trouble to figure out how to start it. I am pretty much lost and confused and don't know what to do. I do not want anyone to complete it for me but giving me … | |
i have to create a DigitsDisplay application that prompts the user for a non negative integer and then displays each digit on a separate line like such "Enter a positive integer: 789 7 8 9 so far i have int num; c.print ("Enter a postive number: "); num = c.readInt … |
The End.