2,443 Posted Topics
Re: So find a JavaScript forum. Java != JavaScript | |
Re: Java.util.Random and a long list of questions with the answers. | |
Re: Ask them, maybe? | |
Re: Debug the code to find the actual type number returned and what it equates to. If you don't know how to use the debugger then print out the varying types at the top of the method as follows [code=Java] System.out.println("Integer TYPE: " + Types.INTEGER); System.out.println("Float TYPE: " + Types.FLOAT); ... … | |
Re: Maybe you can get one of your fellow grade schoolers to do it for you for that price. If you multiply the price by ten, you may get some semi-competent unethical "working person" (I won't say professional) to do that simple thing for you, but I wouldn't expect quality, even … | |
Re: Your problem, is that with a JDBC connection [code] Connection con = DriverManager.getConnection("jdbc:mysql://localhost:3306/","root",""); [/code] You [i]must[/i] provide a db instance. Since you're connecting with root, anyway, use "mysql". But, I would advise against using this, [i]and[/i] against using root. Connect to test. [code] Connection con = DriverManager.getConnection("jdbc:mysql://localhost:3306/test","root",""); [/code] I would … | |
Re: And don't forget to acknowledge the help you received here to your instructor, ah, I mean friend, of course. ;-) | |
Re: Those are [i]not[/i] tcp/ip commands. Those are simply executables (of whatever form) for a specific OS whose purpose just happens to be in listing/verifying/modifying interface/network information. In any case, [i]every[/i] language has the ability to perform (at least most) of those actions, just not in a one method "here you … | |
Re: Are you [i]actually[/i] asking us what you should include on your resume to fake one years experience in Java? | |
Re: Every IDE available that allows the development of Web Applications, have an option to create a "war" or "ear" file of the application, which then needs simply be imported by the web container / application server in question. There is no need for any type of Windows style "installer" program. | |
Re: Your "web application" should, obviously, be deployed to a web container, and then, as long as the app is set to "autostart" in that container, starting that container will start that app (and the container usually does have "an exe", as you all like to say). If you have a … | |
Re: Use the "getters and setters" properly? If you show your code (and use code tags), we could probably give a better answer. | |
Re: You [i]need[/i] to [i]use[/i] a session to keep track of what the user has entered, then during the loading of each page, you can check whether a session key exists for that question, and if so, check the radion button for that answer checked. Peter's answer was a suggestion of … | |
Re: I am quite sure that you can, the question then is, however, "Will the monitor/graphics card support it?" And the answer to that is "Probably not". | |
Re: [code] int answer; System.out.print("Please type a number < 1 for Ali, 2 for Ahmad, 3 for Ah Chong, 4 for Muthu, 5 for Ramasamy >: "); if(answer == 1) [/code] Where, above, do you give "answer" a value? The answer, you don't. I assume you want to read user input … | |
Re: You would need to occassionally "poll" the DB (and hopefully you have a timestamp field to make it "easy"). | |
Re: Could we see the "AppStarter" code. At least the constructor, and the setIconImage method (if you have overridden it). | |
Re: There is a Java3D API library available. Google for it. ;-) | |
Re: See if you can spot the reason. If you can't just ask. ;-) [code] import java.awt.*; import javax.swing.*; public class GridBagExperiment extends JFrame { JPanel redPanel, bluePanel, greenPanel, yellowPanel; double col1Weight = 0.4; double col2Weight = 0.2; double col3Weight = 0.4; double row1Weight = 0.4; double row2Weight = 0.6; GridBagConstraints … | |
Re: I would have done it this way (as long as you can modify the Vector passed in, conceptually, as technically you can). [code=Java] // could also be void, make Vecotr so that it can be "chained" public Vector sortContacts(Vector v) { for(int i = 0; i < v.size() - 1; … | |
Re: Give it a try, but remember that if you need to retreive the "rows" from the Map in the same order in which you inserted them, then make sure you use a LinkedHashMap, and not a standard HashMap or TreeMap | |
| |
Re: No, there isn't. It sounds like you're talking about operator overloading, which Java, by a conscious decision, does not have. | |
Re: I think you want [code] final JScrollPane scroller = new JScrollPane(); [/code] and not [code] final JScrollBar scroller = new JScrollBar(); [/code] | |
Re: Well, seeing as how we have no idea what you did, we have no idea what's wrong with it. | |
[QUOTE=madhavireddy]Hi, I am new to java I have a project to be done with early deadline. Can u please help me how to write code in java to send GET request to server from client. Thank you in advance.[/QUOTE] So, you accepted a job you're not qualified for, or you're … | |
Re: What are you talking about? Look up HttpURLConnection in the API or HttpClient from apache. And, no, neither of these things will give you finished code to simply execute and do what you want. Nothing ever will. Both of these are APIs, of which you can search and find tutorials … | |
Re: Try making a "smaller" try/catch block (i.e. only around the "pIndex =" line). Edit: And, that way, you can, of course, simply do nothing in the catch block (although you would, normally, at least log the fact that the exception occurred, even if you don't do anything about it). | |
Re: Start the program with an administrator user and don't give the users administrator privileges. | |
Re: Why a collection. Why not directly to a DB, or, worse case scenario, a file (i.e. randomaccessfile)? In any case, 65k is [i]not[/i] much. You could simply increase the maximum heap size. | |
Re: [code] package whatever; public class Read { String DATE_FORMAT_NOW = "yyyy/MM/dd hh:mm:ss"; SimpleDateFormat sdf = new SimpleDateFormat(DATE_FORMAT_NOW); long starttime = System.currentTimeMillis(); String timeS = sdf.format(new Date(starttime)); void readFile(String fileName) { System.out.println(">> time of exe: " + timeS + " milliseconds: " + starttime); BufferedReader br = null; try { br … | |
Re: You want to assign "largestSoFar" to "secondLargest" before you assign "number" to "largestSoFar", but within the same if block. | |
Re: Use tomcats connection pool and add the Driver jarfile to either shared/lib or common/lib (whichever is more appropriate or still exists in that tomcat version) as per the tomcat documentation. | |
Re: Post the command you ran that gave the error. | |
Re: [QUOTE=muskan;487747]thanx to all of u friends. mt problem was solved by putting connector :mysql-connector-java-3.0.16-ga-bin.jar in jdk ----jre folder in lib----ext[/quote] Which is exactly the wrong place for it. Never place third party libraries here. [quote] and also copy it in tomcat---lib.[/QUOTE] tomcat/common/lib is the proper place (or is it tomcat/lib/common, … | |
Re: Most likely those "pages" are pre-generated and then accessed statically (although I didn't look at them, but if they are suppossedly "huge", and still load in the millsecond to 2-3 second range, then this is about the only possibilty). | |
Re: [url]http://java.sun.com/docs/books/tutorial/networking/index.html[/url] | |
Re: Don't do it that way. That is Database specific. Read the API docs for DatabaseMetaData. | |
Re: They don't have a full environment. Set the environment variables you need (such as PATH) in the script. | |
Re: Actually do [inlinecode]sudo test ....[/inlinecode] rather than [inlinecode]sudo [ .... ][/inlinecode] | |
Re: You need to check how long the last line is before you write it, then use seek to back up that amount. | |
Re: Modulus. It produces the "remainder" from a division. I.E. 10 % 3 returns 1 and 11 % 3 returns 2 and 12 % 3 returns 0. | |
Re: When you add the keys, upper case them, and then uppercase the "search" key when retrieving one. Otherwise, you are going to have to loop through the keys yourself using equalsIgnoreCase to find the right key. | |
Re: [code] Set<Object> check = new HashSet<Object>(); for (Whatever sNum : s) { if (!check.add(calculation(codeword, sNum))) { // whatever } } [/code] There is no reason to call this "calculation" method multiple times for the same "sNum" (that is [i]extremely[/i] ineffecient), and the add method of Set will return false, if … | |
Re: I will be very positive when I tell you that we are not just going to do it for you. Tell us [i]exactly[/i] what problem you are having and we will help you correct it, otherwise, [url]http://www.rentacoder.com/[/url] | |
Re: What are you using to compile? If you are using an IDE, then you need to add that jar as a library in the project properties. Edit: As [i]that[/i] is the CLASSPATH for an IDE. The System CLASSPATH is good for almost nothing, anymore. Do the following concerning classpaths 1. … | |
Re: [QUOTE=gcr007;825932]I need how to create a java file dynamically.Also i need to add my own methodes,attributes etc to it and save this java file to a specific directory.[/QUOTE] Once again, you are describing a means to an end, would you care to illuminate what the "end" should be? I.E. What … |
The End.