- Strength to Increase Rep
- +15
- Strength to Decrease Rep
- -3
- Upvotes Received
- 293
- Posts with Upvotes
- 273
- Upvoting Members
- 131
- Downvotes Received
- 22
- Posts with Downvotes
- 21
- Downvoting Members
- 17
Web developer
- Interests
- Anime, Manga, Fencing, Formula 1 (Ferrari rules), java, Magic the Gathering
Re: I drink hot chocolate while I am writing code, and potato chips with coke when playing video games | |
Re: [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 … | |
Re: [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 … | |
Re: [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. | |
Re: *saadismail85* please use code tags and/or start a new thread. For code tags click the button: (code) when you write your post | |
Re: 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 … | |
Re: 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 … | |
Re: [QUOTE=itovin;1216633]pano po gawin sa java yung kunyare nag-enter ako nang number tapos ang lalabas asteris(*)[/QUOTE] Start a new thread. | |
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. … | |
Re: 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 … | |
Re: 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? | |
Re: Your question doesn't make any sense. Post an example, read about javascript | |
Re: 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? | |
Re: 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 | |
Re: 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. | |
Re: > 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. … | |
Re: [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 … | |
Re: 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 | |
Re: [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 … | |
Re: 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. | |
Re: 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 | |
Re: java DooBee at the cmd to "run" the file .class | |
Re: 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 = … | |
Re: [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 … | |
Re: 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 … | |
Re: 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 … | |
Re: Check the API for the String class. There you will find many useful methods | |
Re: 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. … | |
Re: 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 | |
Re: 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); } … |