Posts
 
Reputation
Joined
Last Seen
Ranked #56
Strength to Increase Rep
+15
Strength to Decrease Rep
-3
92% Quality Score
Upvotes Received
293
Posts with Upvotes
273
Upvoting Members
131
Downvotes Received
22
Posts with Downvotes
21
Downvoting Members
17
119 Commented Posts
~1.09M People Reached
About Me

Web developer

Interests
Anime, Manga, Fencing, Formula 1 (Ferrari rules), java, Magic the Gathering
Favorite Tags

1,963 Posted Topics

Member Avatar for Duki

I drink hot chocolate while I am writing code, and potato chips with coke when playing video games

Member Avatar for Dani
22
17K
Member Avatar for Magda

[QUOTE=pabs31;301752]Try this out then: 1. Click Start then Run and type in cmd then press Enter...this will bring up command prompt. 2. in command prompt type ipconfig /flushdns (you will get a message saying successfully flushed DNS) 3. type exit and try browsing again If this does not work than …

Member Avatar for omegaredczky
0
5K
Member Avatar for Archenemie

[QUOTE=masijade;1062384]Manual. Gives full control with no "bolierplate", repetitive, rigid code. But that's not what you're looking for is it? I dislike [i]all[/i] "Gui builders", as they all produce rigid, reptitive code that is hard to modify correctly, and is not always that effecient when any action to be performed is …

Member Avatar for dotxyteam
0
2K
Member Avatar for rudypooh786

[QUOTE=ramborambo;867297]Do it yourself!![/QUOTE] That was very rude. You judge others when yourself have created 2 identical threads with the same question.

Member Avatar for KAIWEN KEVIN
0
4K
Member Avatar for shantuli

*saadismail85* please use code tags and/or start a new thread. For code tags click the button: (code) when you write your post

Member Avatar for zunam
-5
81K
Member Avatar for ArunRaj.SRM

That you want in the way you want it cannot be done. If you want to call a java method, after the page has rendered, by clicking a button you need to submit the form, to a servlet or jsp (preferably a servlet) and there you can call your java …

Member Avatar for maheen_1
0
3K
Member Avatar for memegha123

You should add to your pages code that checks the session. If it doesn't contain the user information redirect to the login page. The user can go directly to whatever page they want by providing url at the browser. [U]Then[/U] you need to check if there is a session with …

Member Avatar for youngbill
0
3K
Member Avatar for john44

[QUOTE=itovin;1216633]pano po gawin sa java yung kunyare nag-enter ako nang number tapos ang lalabas asteris(*)[/QUOTE] Start a new thread.

Member Avatar for yash_8
2
1K
Member Avatar for javaAddict

Hi All. This is my first code snippet. I don't know how practical it is, but I came up with the idea, so I wanted to do it. Assuming you have an array. You use a for loop to display its data. For 2D arrays you use 2 for loops. …

Member Avatar for JamesCherrill
0
929
Member Avatar for anand01

Do you know how to run queries with java and how in general to insert data in a database? There are several ways so can you post the code that use to insert normal data, so we can give you a suggestion similar to your code style? Do you use …

Member Avatar for Sushmitha_1
0
9K
Member Avatar for miss zuzu

Are you talking about localization where you can change the labels of your page to the language of your choice, or you want the user to enter a word and the page will translate it?

Member Avatar for sr.mohan06
0
1K
Member Avatar for nikita.chandra
Member Avatar for Varun_2
0
2K
Member Avatar for MrCapuchino

I believe that the request.getParameter("test") will give you the value "1", not the "Hi". Why do you think that it is not working?

Member Avatar for vinay.yash.3
0
6K
Member Avatar for Inimitable

The Person class is abstract. So the classes that extend Person must implement all the abstract methods of Person. The classes: Students and Lecturers must implement the method getRegisterNo() . You have forgotten to implement this method when you did: Students extends Person

Member Avatar for Inimitable
0
246
Member Avatar for hbelle.28

Why don't you try the API for String, and the methods indexOf. If it returns something not -1 then increase a count++ and search for the occurrence of the letter after that index.

Member Avatar for stultuske
0
484
Member Avatar for doha786

> Pls help urgently, i want to read text files from directory but keeps giving me 3 errors C:\Users\teejay\Documents\OneFile.java:52: reached end of file while parsing } C:\Users\teejay\Documents\OneFile.java:18: 'try' without 'catch' or 'finally' try{ //read one text file C:\Users\teejay\Documents\OneFile.java:18: 'try' without 'catch' or 'finally' try{ //reached end of file whele parsing. …

Member Avatar for JamesCherrill
0
4K
Member Avatar for mrabrar09

[QUOTE=mrabrar09;1740430]Actually i have written a small program on division, now i want see the control flow means how the line of code is executing and calling the methods and function step by step. But when am run the program in debug mode nothing is showing[/QUOTE] You must first place a …

Member Avatar for stultuske
0
532
Member Avatar for new_2_java

Inside the run method of the Thread class have a boolean method take value true when it finishes. That variable will be declared as an attribute of the class. When you call the thread have a while loop checking that variable when it becomes true you will exit the loop

Member Avatar for JamesCherrill
0
6K
Member Avatar for oberle1515

[QUOTE=mudasir rashid;1463586]send me the code of these Using two dimensional array in java write program to print following Pascal triangle. 1 1 1 1 2 1 1 3 3 1 1 4 6 4 1[/QUOTE] We don't give away code. We help those who are willing to learn. Start a …

Member Avatar for pritaeas
-1
479
Member Avatar for mahaboob Basha

Have a variable that counts how many times the password has been entered. When the password is wrong increase its value and put its value to a hidden field so to get it at request when the form is submitted again the next time.

Member Avatar for rexraja
0
2K
Member Avatar for kim2_0016

Any beginner's java book has examples on how to create gui using javax.swing.If you don't have already such a book search the internet for tutorials. And check the java API for the following classes: JFrame, JPanel, JTextField, JPasswordField, JButton, JLabel And the interface ActionListener

Member Avatar for fliponymous
0
544
Member Avatar for ghfeyn
Member Avatar for armani05

Change this: [CODE] System.out.println( " Please enter number of rows in integer type "); try { String MAX_ROWS = stdin.readLine(); } catch (IOException e) { e.printStackTrace(); } [/CODE] To This: [CODE] String MAX_ROWS = ""; System.out.println( " Please enter number of rows in integer type "); try { MAX_ROWS = …

Member Avatar for stultuske
0
368
Member Avatar for orca_lee

[QUOTE]FirstAglet.java:3: package com.ibm.aglet does not exist import com.ibm.aglet.*; ^[/QUOTE] Do you have the package where the aglet is implemented: com.ibm.aglet ? You need to get the jar file of the package or the class files in order to be able to import them. The program of your friend runs because …

Member Avatar for stultuske
0
453
Member Avatar for MeandJava

First of all, in the ImageIcon method you pass the filename as argument and then you set it to "" . Why? Just pass the argument to the constructor and create the image. Why do you "delete" the argument by doing this: filename = ""; And since you have the …

Member Avatar for Ranjana_1
0
4K
Member Avatar for thijo

You can use BufferedWriter to write to a file: [CODE] FileWriter fWriter = null; BufferedWriter writer = null; try { fWriter = new FileWriter("fileName"); writer = new BufferedWriter(fWriter); //WRITES 1 LINE TO FILE AND CHANGES LINE writer.write("This line is written"); writer.newLine(); writer.close(); } catch (Exception e) { } [/CODE] Also …

Member Avatar for JamesCherrill
0
527
Member Avatar for loozax
Member Avatar for JamesCherrill
0
715
Member Avatar for sherjaan

Hi, You cannot call a java class if it doesn't have a main method. In the code you posted there is this line: // public Static Void main (String args[]){} (Static needs to change to static) When you run a java class: E:\sher\SkyDrive\Exercise Files\L04>java Student Its main method is called. …

Member Avatar for JamesCherrill
0
822
Member Avatar for parkz16

If you read the messages they tell you at which line you get the error and what the error is. You are using something which is null

Member Avatar for bguild
0
33K
Member Avatar for letlet_pogs

Assuming you something like this: [CODE] public class Calculator { public static void main (String args[]) { String exp = JOptionPane.showInputDialog("Enter mathematical expression: "); exp = infixToPostfix(exp); JOptionPane.showMessageDialog(null,"Postfix expression: " +"\n"+ exp); } public static String infixToPostfix (String infix) { (some codes here)......... else { JOptionPane.showMessageDialog(null, "Invalid expression."); System.exit(0); } …

Member Avatar for JamesCherrill
0
7K
Member Avatar for tanya1989

Your code is correct with the difference that you need to call the **nextLine**: Scanner sc = new scanner (file); while (sc.hasNext()){ String data = sc.nextLine(); String[] val = data.split(","); System.out.println(values[0] + " " + values[1]); }

Member Avatar for stultuske
0
335
Member Avatar for pheonixkid

Can you post some code? Have you tried debugging your code by adding some System.out.println messages to see what is happenig as the code runs?

Member Avatar for pheonixkid
0
280
Member Avatar for hapizi84

Hi everybody, I also have a question related to this matter and I hope I am not out of topic. Me and a friend of mine bought a year ago new PCs with Vista installed. He is been telling me that he wants to upgrade to Windows 7, but I …

Member Avatar for razib8bd
-1
1K
Member Avatar for Lindsey1211

Hi let me give you an example about the default constructor. Suppose you have this: class MyClass { public String a = null; } You can instantiate it like this: MyClass cl = new MyClass(); You haven't declared a constructor so it will use the "default". A no-argument constructor. If …

Member Avatar for stultuske
0
283
Member Avatar for Lindsey1211

From what I see, you have your code in the readCustomerData method. Every time you call it, new data will come in the ArrayList. Also you don't use the argument of the method. I don't know if this is what you want, but if you want to have the ArrayList …

Member Avatar for javaAddict
0
187
Member Avatar for baneyramos_09

[QUOTE=baneyramos_09;1321173]? missing return statement! hi guys, Im trying to compile this class below, but its just not working, it keeps sating 'missing return statement' int the method declaration line. Can u see to check if there is anything missing in my code or if iv done something wrong?? Thanks! public …

Member Avatar for stultuske
0
262
Member Avatar for Umesh17_89

You can do this with IFRAME. You can add an onclick event at the link. When that link is clicked execute a javascript method. In that method you can take the iframe and set its src (source) with that page: [CODE] <IFRAME name="yourIframe" id="yourIframe" src="empty.jsp"></IFRAME> [/CODE] Create an empty jsp …

Member Avatar for sujeshmarar1
0
2K
Member Avatar for xterradaniel

For writing I use this: BufferedWriter, FileWriter: [CODE] BufferedWriter wr = null; try { wr = new BufferedWriter(new FileWriter("Exercise09_19.txt")); wr.write("something"); } catch (Exception e) { System.out.println(e.getMessage()); } finally { if (wr!=null) wr.close(); } [/CODE] The BufferedWriter is declared outside the try, in order to be "visible" in the finally when …

Member Avatar for nate.nelson.566
0
3K
Member Avatar for bymak87

You need first to populate all the array and then sort. What you do is this: [CODE] for () { array[i] = number; sort; } [/CODE] But with that you put the first number and you sort an array that has only 1 number. Then you add a second number …

Member Avatar for nate.nelson.566
0
1K
Member Avatar for nHulk

Delete everything you have done because they are wrong. From the code, are you saying that you have a ResultSet in the jsp so you are calling the database from inside a jsp? That is wrong. Create a method, execute the query inside that method and return an array or …

Member Avatar for jalpesh_007
0
1K
Member Avatar for stopah2008

[QUOTE=stopah2008;630333]Could someone help java code to read number of lines, words and characrters in paragragh .[/QUOTE] You can count how may times the \n appears in the paragraph for lines. For characters the total length of the paragraph String minus the characters: " ", " ", " ", ... For …

Member Avatar for JamesCherrill
0
257
Member Avatar for zwench

What errors do you get? Does the program compile, run? Do you get the desired results?

Member Avatar for kanu.votka
0
911
Member Avatar for feoperro

Where do you want to be printed? I would suggest to have a button with each row that has that "onclick" event. When the rows are dynamically created you can have the value you want to be printed passed as a parameter at a method in the "onclick" event. I …

Member Avatar for ChandraSekaranU
0
211
Member Avatar for cmh0114

All I would do is create a separate thread and start it whenever I want: [CODE] class MyThread extends Thread { } [/CODE] [CODE] MyThread mt = new MyThread(); mt.start(); [/CODE] Now in the run method you can try something like this: [CODE] int count = 0; while (count<10) { …

Member Avatar for JamesCherrill
0
854
Member Avatar for sach_ak47

[QUOTE=jimmylee;1009950]How do I convert the Integer to String by: 1. Asking the user to input the number (Eg: 704 = Seven Hundred and Four) 2. Display the output in JTextArea. Thanks for your support.[/QUOTE] Start a new thread. This is a 3 year old thread.

Member Avatar for stultuske
0
2K
Member Avatar for Krazykado

[CODE] public class Dice { public static void main(String[] args) { // Welcome message. System.out.println ("Welcome to The Dice Roller Game!"); // Roll the dice. int die1, die2; int rollcount; rollcount = 0; int wins = 0; Scanner keyboard = new Scanner(System.in); int userinput=-1; do { die1 = (int)(Math.random()*6) + …

Member Avatar for matencio
0
801
Member Avatar for Techboy52
Member Avatar for JamesCherrill
0
2K
Member Avatar for hemanth.balaji

This is part of the stack trace: BasicTreeUI.paintRow(BasicTreeUI.java:1399) It means that at the file BasicTreeUI.java, you have an Exception at line 1399 (function paintRow). You are trying to use something that is null.

Member Avatar for JamesCherrill
0
758
Member Avatar for ITHope

Just loop the array or the ArrayList until you find the element that is equals with the input. If you are using Strings use the equals method. If you find it return the index of the for loop. If the loop finishes without finding anything return -1

Member Avatar for javaAddict
0
321
Member Avatar for GrimJack

When you use: [ICODE] for (int i=0;i<length;i++) [/ICODE] And others use: [ICODE] for (Object o:array) [/ICODE]

Member Avatar for vinnitro
1
3K

The End.