473,544 Members | 1,954 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.
1
10,717
thread by: CSunil111 | last post May 15 '17 by: chaarmann
Hi friends, Being new in junit i have onw question that How to test local variable in method using junit test case? Check that below is my method suppose, public void methodToCheckStr(int testVar) { String str=""; if(testVar==5)
1
1,188
thread by: anujtmr9 | last post May 15 '17 by: chaarmann
I m executing a .bat file by Java run time.But the process starting the command prompt exist immediately.Is there any way to keep track when the command prompt process will be completed.?
2
1,183
thread by: RcExtract | last post May 3 '17 by: Durgesh
When I tried to run a code, an error occurred. Please explain why error occurred and how to fix it, thanks. Here is my code: /* package whatever; // don't place package name! */ /* Name of the class has to be "Main" only if the class is public. */ import java.util.ArrayList; class Demo
3
1,387
thread by: obinnafelix42 | last post Apr 26 '17 by: chaarmann
write a java program of an array of strings which contains the names of playing cards. when run,the program will display five(5) random playing cards.
2
1,130
thread by: mizzy | last post Apr 24 '17 by: chaarmann
In this simple java program the user is asked for account no , current meter reading and previous meter reading and then calculates the total amount using the electricity usage for that account. When the user enter 0 as the account no the program stop by showing the total amount for all accounts. The program is already doing it but there is...
1
1,786
thread by: srikanth d | last post Apr 12 '17 by: chaarmann
Hi everyone, We have a requirement to convert from java object to xml, csv, json, unedifact, delimiter files. will anyone kindly advice me to proceed? for java-to-xml smooks has example application but in that , the xml's elements are named with fully qualified names of the classes, but our requirement is it should not be and for the...
1
1,043
thread by: Tush 2017 | last post Apr 11 '17 by: chaarmann
Calculate the net pay for each employee. The system should allow user to enter employees number, name , gross pay(this is untaxed salary plus allowances), PAYE, HELB(this is optional ranges from 1000 to 5000), SACCO (optional ) The system should ask if an individual has HELB or SACCO LOAN.. If no.... Computation proceeds excluding them... The...
1
2,219
thread by: aphip13 | last post Apr 10 '17 by: chaarmann
im struggling with the man/driver class heres what i have for code package GradebookProg3; import java.io.FileNotFoundException; import java.io.FileReader; import java.util.Scanner;
2
3,440
thread by: rspvsanjay | last post Mar 22 '17 by: rspvsanjay
I want to print URL into next jsp page , even if URL has hindi text content. index.html file : <html> <head> <title>T-SUMM</title> </head>
1
1,127
thread by: Zen25 | last post Mar 22 '17 by: chaarmann
This is a program to create an Invoice Calculator application; the user inputs the subtotal and the application will calculate the invoice and, display the discount percent and discount amount. - if the subtotal is more than or equal to 200, the discount percent is 20% - if the subtotal is less than 200 and more than or equal to 100, discount...
1
1,187
thread by: gaop818 | last post Mar 17 '17 by: chaarmann
I created four maven projects, namely: project_core, project_a, project_b, project_main. The relationships are: project_a relies on project_core, project_b relies on project_core; project_main as a startup project, through external configuration files and customized ClassLoader load project_a and project_b, similar to tomcat. The...
1
1,053
thread by: Zen25 | last post Mar 13 '17 by: chaarmann
How do I use an int variable as a boolean. private int choose; System.out.println("Do you wish to apply for the loan \n1 Yes n\2 No"); choose = scanner.nextInt(); if (choose = 1) System.out.println("You have applied for the loan"); else
1
1,677
thread by: balamurali1111 | last post Mar 15 '17 by: chaarmann
I am trying to read an GZ file which has EBCDIC data and need to write the records into output file if that records has an character in a given position. I have done the below: Read the GZ file line by line using Buffered reader and GZInputStream, however when I read line ny line I am not able to compare the input char with the record. I...
1
1,282
thread by: Zen25 | last post Mar 13 '17 by: chaarmann
This is a basic sign in application I created. Currently I'm studying Java Programming and doing this to practice for a future assignment. Please comment whether if my code is okay or if it needs improvement; and if it needs to be improved how do I do it. import java.util.*; class LogIn { Scanner key = new Scanner (System.in); ...
1
1,206
thread by: slayerr1002 | last post Mar 8 '17 by: chaarmann
Hi, i need a javascript for my website. what i wanna do is that when smone loads my website, the script initiate the left mouse click automatically. that is on page load mouse click is stimulated. dnt know if its possible or not. need help. Thanx in advance
1
1,132
joewin
thread by: joewin | last post Feb 28 '17 by: Frinavale
I have a question with a program. The assignment is 1. Read the values of an integer array variable. 2. Display array element values which are divisible by 3.
1
3,606
thread by: katoforever | last post Feb 27 '17 by: Frinavale
I want to use web service to communication with Java and C++. c++ as the server,using GSoap to publish and Java is the client side,using Apache's cxf. Here is the Client code: import java.nio.charset.Charset; import java.rmi.RemoteException; import javax.xml.namespace.QName; import javax.xml.rpc.ParameterMode; import...
0
1,187
thread by: rspvsanjay | last post Feb 21 '17 by: rspvsanjay
i am using one servlet file, one java file, one html file as given below: //Extraction1.java //java file import java.io.IOException; import java.net.URL; import java.util.Scanner; public class Extraction1 {
4
1,554
thread by: rspvsanjay | last post Feb 16 '17 by: rspvsanjay
in this program, i have given wikipeadia URL for text extraction logic but after extraction of text for loops are taking to much time to execute. the same logic too fast in python program. how to reduces execution time ? import java.io.IOException; import java.net.URL; import java.util.Scanner; import java.util.regex.Matcher; import...
2
1,999
thread by: rspvsanjay | last post Jan 25 '17 by: rspvsanjay
when i am deploying to heroku server the following error is coming. how , may i resolve it Failed to execute goal com.heroku.sdk:heroku-maven-plugin:1.1.3:deploy-war (default-cli) on project ProjectToDeploy: Failed to deploy application: Could not get API key! Please install the toolbelt and login with `heroku login` or set the...
1
1,198
thread by: allynvo206 | last post Jan 23 '17 by: chaarmann
I don't know where to start for this but I've been looking around and asking and I think i'm supposed to use tokenizers. The rules I have to follow are: 1. Remove all commands backslash followed one or more lowercase letters and terminated with a blank. 2. Remove all braces: } or {. 3. Substitute all math display (characters in between $),...
3
2,063
thread by: paul hanks | last post Feb 10 '17 by: zmbd
Hello, I really need guidance for my research paper. As I have to implement my research into the project so I decided to opt the Java language for the implementation but got stuck in somewhere. can anyone assist me or suggest me any website so that I can get the assistance for code along with my research paper.
1
1,115
thread by: angerami | last post Jan 9 '17 by: chaarmann
var img = new Image(); var now = new Date(); var weekday = new Array(7); weekday = "Sunday"; //9:00 am - 11:00 pm weekday = "Monday"; //11:00 am - 11:00 pm weekday = "Tuesday"; //11:00 am - 11:00 pm weekday = "Wednesday"; //11:00 am - 11:00 pm weekday = "Thursday"; //11:00 am - 11:00 pm weekday = "Friday"; ...
-
-
thread by: gilberto0123 | last post Dec 31 '16 by: gilberto0123
Moved:
4
1,254
thread by: ikkyizzy | last post Dec 8 '16 by: chaarmann
public static FoodTruck getTruckByTruckId(int truckId){ FoodTruck course=new FoodTruck("","","","",""); fillCourseListFromFile(); for(int i=0;i<foodTruckList.size();i++){ if(foodTruckList.get(i).getTruckId()==(truckId)){ course=foodTruckList.get(i); break; } }...

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.