32,199 Topics

Member Avatar for
Member Avatar for johnnny

Hello all, Need help with a little assignment in java assignment : user inputs sentence, replaces all lowercase letters in string to uppercase, and vice versa. ive created for (int i = 0; i < s.length(); i++) { if (Character.isUpperCase(s.charAt(i))) { to DETECT if there is an uppercase letter found …

Member Avatar for Lau_1
0
190
Member Avatar for Pallab_2

Hi, can anyone pls help to understand why its throwing class not found error, i am trying to learn how JWS works. i just followed this blog, though every thing looks ok.Attaching the files as well. http://examples.javacodegeeks.com/java-basics/web-start/java-web-start-getting-started/ Pallab

0
119
Member Avatar for Gabriel_7

ok well i just started with Java and i have an assignment that is giving me a hard time what i'm supposed to do is take an entry number(int) and then arrange its digits in an ascending and a descending way, the problem is i don't know much about arrays …

Member Avatar for stultuske
0
234
Member Avatar for sahil.d
Member Avatar for sasikrishnasamy

Hello All, I want to sort my list order by sno. This is my code, List<Employee>list=new ArrayList<Employee>(); Employee class has fields, one of field is sno (its String type); this field values are like this format 1.2.1 1.2.3 1.5.5 1.5.3 I want to sort this serial no. I used comparator …

Member Avatar for 2teez
0
429
Member Avatar for samantha2015

I have a class that implement all my workflow method. At some pointing time, when the request is approved by the workflow, I need to update status in database. For this I need to call the respective service class to save the status. The following method is saving the status …

Member Avatar for samantha2015
0
273
Member Avatar for Alok_5

I want to remove the specific nodes from xml file under song tag whose id =2 from the following file in Android (Java): <music> <song> <id>1</id> <albums_id>1</albums_id> <title>Someone Like You</title> <artist>Adele</artist> <duration>4:47</duration> </song> <song> <id>2</id> <albums_id>1</albums_id> <title>Space Bound</title> <artist>Eminem</artist> <duration>4:38</duration> </song> <song> <id>3</id> <albums_id>1</albums_id> <title>Stranger In Moscow</title> <artist>Michael Jackson</artist> <duration>5:44</duration> …

Member Avatar for Karan_8
0
287
Member Avatar for Ahmed_62

i have these buttons what i wanna do is when i press any of them change the button name to "Ouch!" import java.applet.Applet; import java.awt.Button; import java.awt.Color; import java.awt.Graphics; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; public class sudokou extends Applet { Button num[] = new Button[9]; int x, y, i, j, n …

Member Avatar for JamesCherrill
0
223
Member Avatar for jorwill.harion

Hello! I am new in java and I have this code that will throw an exception if the numerator input is not an integer and will stop the loop process when the user input 'e' as its numerator. Thank you for your help in advance. package org.alibata.training.codes.exceptions; import java.util.InputMismatchException; import …

Member Avatar for JamesCherrill
0
439
Member Avatar for sabeenasyed

Hi.I want to convert telugu text to unicode. please solve my problem. Thankyou --------- sabeena

Member Avatar for rubberman
0
133
Member Avatar for JamesCherrill

I've opened this thread following rotten69's suggestion for "Java projects for beginners". To get things started I've posted a project in a format that makes sense to me; please feel free to follow that format, or to do it in some completely different style if that seems better. Let's see …

Member Avatar for Alok_5
20
3K
Member Avatar for dtpp

Ive been having this issue for quite a long time. When coding in Java my IDE (Eclipse) will not allow me to create JAR file. Ive googled quite alot only to see there is no direct solution to this and the causing factor may be Win8.1. I thought - ok …

Member Avatar for stultuske
0
226
Member Avatar for Ankit_18

import java.util.ArrayList; import java.util.Arrays; import java.util.List; class Counter { public void split(String a,ArrayList<String> al) { char ch[]=a.toCharArray(); int p=0; for(int i=0;i<ch.length;i++) { if(ch[i]==32) {List<String> l=al.subList(p,i); ArrayList<String> al1=new ArrayList<String>(l); //String str=new String[al1.size()]; //al1.toArray(str); //al1.add(str); //al1.add(al1); //why this is also wrong al1.add(al.sublist(p,i)); p=i; System.out.println(al1); } } } public static void main(String... s) …

Member Avatar for stultuske
0
259
Member Avatar for new_2_java

Hello all, I have a function in JS, that I need to translate in Java to be used in my JSP as part of server side script. I need to find out what's the equavalent of JSON.stringify() in Java? This is my current JS function. This functioin takes a CSV …

Member Avatar for peter_budo
0
2K
Member Avatar for rajashree g.s.

1.Take input for boarding place,arriving place and date. 2.Date validation for 120 days(if date is more than 120 days you are not able to book the ticket).if days are less than 120 days then ask for the count of passengers. 3.Take passengers age and gender. 4.If age is less than …

Member Avatar for JamesCherrill
0
387
Member Avatar for Sandeep_13

Hi I am new in java. I am trying to get the stored date in the database and display the same in jdatepicker in frontend. But I failed. Can any one of you suggest how to do the same. Regards Sandeep

Member Avatar for mKorbel
-1
621
Member Avatar for Hsn_1

Hello everybody I'am trying to execute JavaScript in GeckoWebBrowser my code is : Hide Copy Code GeckoWebBrowser1.Navigate("javascript:void(" + TextBox2.Text.Replace("""", """""") + ")")` my JavaScript is : Hide Copy Code var r = confirm("Press a button"); if (r == true) { x = "You pressed OK!"; } else { x = …

Member Avatar for stultuske
0
1K
Member Avatar for Szabi Zsoldos

Hi guys, I've made an application in JavaFX and I do want to export it into a runnable jar. When I run it from Eclipse or Netbeans, it works well. But when I run it from windows as an executable jar I get this error for my layout. Exception in …

Member Avatar for Szabi Zsoldos
0
4K
Member Avatar for Rachna_2

in an examination the grades are given according to the marks obtained. wap in java to display the grades acordingly 80% and above-distinction 60% or more but less than 80%- first divison 45% or more but less than 60%-second division 40% or more but less then 45- pass Less then …

Member Avatar for JamesCherrill
0
171
Member Avatar for paul.deku.50_1
Member Avatar for kapil456
Member Avatar for skaa

I need to use Drools 6.2.0.Final. Is it possible to use Guvnor with it? Any example? Thank you.

Member Avatar for rproffitt
0
206
Member Avatar for mama12

I want to find min in o(1) and each time min is called min should be deleted static ArrayList <Integer> numbers = new ArrayList <Integer> (); static ArrayList <Integer> min = new ArrayList <Integer> (); public static void add(int num){ numbers.add(num); if(min.isEmpty() || num < min.get(min.size()-1)) min.add(num); } public static …

Member Avatar for JamesCherrill
0
136
Member Avatar for Saidivya

Hi, I want to edit the file in the following way My Sample File: 101 273970116 2719674681506161941D094101METABANK WAVECREST 5220Taxi Charger Micro Deposit - Cr A271967468WEBP2P 150616 1273970110000001 6220110000156534057672 0000000007GreenGrP2C386daTest User S 0273970110000001 6220110000156534057672 0000000005ClarkGrP2C386dcTest User S 0273970110000002 82200000020002200002000000000000000000000012A271967468 273970110000001 9000001000001000000020002200002000000000000000000000012 9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999 9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999 9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999 9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999 In the above file, wherever if …

Member Avatar for JamesCherrill
0
174
Member Avatar for Michael_43

I am trying to validate if this is a BST or not and return a true or false. I believe I have the code right but i cannot get it to print properly if I could get any help how to fix my problem it would be greatly appreciated. Test …

0
160
Member Avatar for sam_7

I will be implementing MVC model in my program but before that, I have done a simple program based on my understanding of the MVC model. I have three pages: - The user will enter a value in page one and click the next button. - The value will be …

Member Avatar for JamesCherrill
0
267
Member Avatar for Dhaval3731

Basic Code Requirements •create a project called TheShipment •create at least two classes 1.Main a.contains the main method b.runs the program 2.Shipment a.calculates the cost of the Shipment Main Class (the class that contains the main method) •prompts the user to enter a id and to enter details about a …

Member Avatar for JamesCherrill
-1
164
Member Avatar for Ahmed_62

public static boolean isEmpty(int grid[][]) { for (int r = 0; r < grid.length; r++) for (int c = 0; c < grid.length; c++) if (grid[r][c]==0) { return true; } return false; } the question is : after returning true it back to (for loop) or not ????

Member Avatar for stultuske
0
157
Member Avatar for SpottyBlue

Hi, The ticket counter program looks fine, but I have ran into a different problem. It is regarding about the transaction class (lines 64 - 110). After I input the number of tickets to print out, it will register to the transaction class. But when I want to view the …

Member Avatar for JamesCherrill
0
1K
Member Avatar for Michael_43

I have been working on this String Split method and the special for loop that I am currently trying to get to properly work does not seem to be working no matter what I do. It keeps printing just the parent directory and not the lower directories. public boolean moveDown(String …

Member Avatar for stultuske
0
198

The End.