Java Essentials
- " :? " operator issue
- Tue, 25 Sep 2007 10:04:00 GMT
- Ok guys, here's the deal. I got an exercise from java to write some programs. It's a basic level, so i presume majority of you will respond in no time. Here we go:"Write a program which 'counts' the biggest and smallest number from two given earlier. Use :? operator."So, I tried so many ...
- " Every Sub is a Super "
- Wed, 14 Nov 2007 22:07:00 GMT
- " Every Sub is a Super "i.e.Super sp=new Super();Sub sb=new Sub();sp=sb; // giving subs reference to super....Thus in case of weaker access sp may nt b able to access the method......
- " how to throw exception inside thread"
- Sun, 23 Sep 2007 20:01:00 GMT
- i want to make throws decleration inside the thread but where. Basically i want to throw connection and runtime exception.Where throws decleration will come 1. in the run method2. or in the thread classMy program is giving error in both casesCan i not throw exception inside the threadPlease ...
- " inside a String
- Tue, 25 Sep 2007 06:50:00 GMT
- Hello how can I say I want to compare a " character or introduce it inside a String.ie:String t="whatever "still on the String" ";I mean havind the " inside the String definition;...
- " instanceof " problem
- Mon, 24 Sep 2007 19:21:00 GMT
- I am working on an employee inheritance problem.Employee is the top class,Labourer extends EmployeeForeman extends LabourerManager extends EmployeeExecutive extend ManagerI am working on the statistics part of the problem and have used the following code to get the total wages of all ...
- " strings are immutable "..... is it true ?
- Sat, 22 Sep 2007 17:46:00 GMT
- class abc{public static void main(String args[]){String x = "Test";x = x + "Test";System.out.println(x); }}output "TestTest"x has changed ! " strings are immutable "..... is it true ...
- " this " problem
- Mon, 24 Sep 2007 14:48:00 GMT
- Hi everyone,I have a problem about this.In the below codes, I have a method called iterator and it reurns an Iterator object.I wonder that when I test this method, whether it copy the " i " object reference or not.And I suppoesed so but when I test it , I saw that it does not copy the reference ...
- "#define" in Java?
- Sun, 23 Sep 2007 02:19:00 GMT
- Is it possible to use the "#define" in java and/or is there anything that works like it ? (same functionnality or close)d_MASTER_x...
- "<" operator on linux
- Mon, 24 Sep 2007 20:51:00 GMT
- hi i have prob.;, i am scared that "<" operator is not supported by java on linux for data import, I have some problem using "<",,,Pls reply ASAP.Thanks.Ankush....
- ")" expected
- Wed, 14 Nov 2007 12:04:00 GMT
- I'm using BlueJ to compile, and I'm getting a ")" expected on this line...while(i=0; i < col; i++){everything through the class has matching opening/closing brackets/parentheses.How can I fix this? int i; is declared, so is int col;Message was edited by: ...
- " " to be delimiter not only " " what can I do?for StringTokenizer
- Wed, 14 Nov 2007 22:55:00 GMT
- In my workIf I have an equation, a+b**c+d*e** means exponent. so b^c (but I should do that way **)there are 5different operators > ** + - / *so...I'm trying to use StringTokenizer.such that,StringTokenizer st = new StringTokenizer(String, "*/+-", true)even if I make (String,"*/+-**", true) ...
- ";" expected... is driving me nuts
- Mon, 24 Sep 2007 14:08:00 GMT
- I keep getting a compile error, ";" expected.This line should not have a ; in it.Public Static int findPalindrome(String num) {The complete program is below. See line 18.public class NumPalindrome { public static boolean verbose = true; public static void main(String[] argv) { String n = ...
- "@" character using FTP
- Thu, 15 Nov 2007 06:23:00 GMT
- Ok,I'm currently streaming in data via FTP usingURL ftpCC = new URL("ftp://" + user + ":" + pass + ".thatisjava.com." + host + file);but I just found out user account passwords can and will sometimes contain the ".thatisjava.com." character. I tested this and it totally re-evaluates the expression and causes a connection ...
- "\n" doesn't work on files?
- Mon, 24 Sep 2007 18:39:00 GMT
- I have a String that contains something like this:Hello,\nmy name\nis Manuel.When I do a System.out.println of that string it comes out like this:Hello,my nameis ManuelHowever, when I redirect that to a file it comes out like this (I wrote ?but it comes out as a square):Hello,簃y name篿s ...
- "+" sign in String
- Sun, 23 Sep 2007 17:53:00 GMT
- Hello,I have tried to replace a part of string which has "+" sign along with that part. But the system hasnt replaced that part.String str1= "replace word check+this one";String str2 = str1.replaceAll("check+this", "replaced");When I printed str2, the result is stillstr = replace word ...
- "=" problem in query
- Mon, 24 Sep 2007 14:45:00 GMT
- my prepared statement is using this SQL query..."select * from myTable where ( time<=? and time=>?) order by time"this query giving is invalid syntax errorb for "=" sign.... if i remove the "=" sign , this works fine.but i want to keep the "=" sign in my query. How ? what should be the ...
- "A reference to an ResourceRef" exception
- Sun, 23 Sep 2007 07:19:00 GMT
- hi All,When the Server starts there's a problem with loading the WAR project. the exception is not a critical one and the application runs anyway, but I want to fix it anyway.[16:43:02:808 IST 07/03/05] 16d416d4 WebContainer A SRVE0169I: Loading Web Module: web_root. <-- the WAR ...
- "a"+"b"+"c", how many String objects created?
- Mon, 24 Sep 2007 16:51:00 GMT
- Hello everyone,String s = "a" + "b" +"c";How many String objects are created?I guess 5, is it right?regards...
- "AA->BB->CC->DD->EE".....need help on this
- Sun, 23 Sep 2007 17:41:00 GMT
- String a = "AA->BB->CC->DD->EE";how can i get the last value of the string "EE" in the simplest way?can i use a.split?thanks...
- "Abstract" method in a non-abstract class
- Sat, 22 Sep 2007 23:45:00 GMT
- Hi all.I have a class "SuperClass" from which other class are extended... I'd like to "force" some methods (method1(), method2, ...) to be implemented in the inherited classes.I know I can accomplish this just implementing the superclass method body in order to throw an exception when it's ...
- "Acceptable" source file size...
- Mon, 24 Sep 2007 14:12:00 GMT
- Hi all!I know that there is no standard for this, but what does good and practical programming suggests as a good number of lines in a source file, keeping in mind good design and simplicity of code?...
- "Access denied" when deleting a file: Help !
- Sat, 22 Sep 2007 15:56:00 GMT
- Hello,I have a problem with the delete() method of the File class. My application creates files that I want to be deleted when there is no need anymore. I would like to delete the files while the application is running and not on exit (that is the reason why I do not use the deleteOnExit() ...
- "access denied:java.io.filePermission" when I want to new ZipFile
- Mon, 24 Sep 2007 12:16:00 GMT
- I want to load a Jar file from server, but I "access denied:java.io.filePermission". What is wrong ? Source code:URI uri = null;try{uri = new URI(applet.getCodeBase() + jarFileName);}catch(Exception e){}jarFile = new File( uri.toString() );try {// extracts just sizes only.ZipFile zf = new ...
- "Anyone knows how to do this?"
- Mon, 24 Sep 2007 14:33:00 GMT
- Need some help with this piece of java coding. Im stuck here and cant continue. Here goes,...BufferedReader data=new BufferedReader(new InputStreamReader(System.in));String ID;boolean valid;int x;valid=true;do{System.out.print("Please enter Customer's Date of Birth ...
- "applet not initialized " error message HELP !
- Sun, 23 Sep 2007 17:20:00 GMT
- My applet compiles ok but when I try to run it at the bottom of the screen it saysstart : "applet not initialized"note - it works ok compiling from the Window console and then openingthe .html file in the browser, but when I try the same applet in the BlueJ IDE ....that is when I get an error ...
- "appletviewer [ options ] urls ... "how to use this syntax.
- Sun, 23 Sep 2007 17:49:00 GMT
- Syntax for Appletviewer:appletviewer [ options ] urls ... DESCRIPTIONThe appletviewer command connects to the documents or resources designated by urls and displays each applet referenced by the documents in its own window. Note: if the documents referred to by urls do not reference any applets ...
- "at" UNIX Command in Java Program
- Mon, 24 Sep 2007 07:22:00 GMT
- Friends,1. "at" command in UNIX execute Unix command at a scheduled time. 2. For each user there will be a table maintained internally which can be accessed by "at" with "-l" argument.3. A mail will be sent to the owner with the output of the commands as a message.I tried to run the "at" ...
- "Attempting to use imcompatible return type" error message !
- Sun, 23 Sep 2007 19:12:00 GMT
- I have an error message that says:"toString() cannot override toString() in java.lang.Object;attempting to use incompatible return type"below is the line of code causing the error:public void toString(){return ("\n" + "Video Name: " + getVideoName() + " video ID: " + getVideoID() + "\n" + " ...
- "Avoid reassigning parameters such as 'myString'" What kind of error is it?
- Wed, 14 Nov 2007 13:41:00 GMT
- This is the method where the compiler gives me an error that I'm not able to understand...private String removeQuotes(String myString) {myString.trim();if (myString.startsWith("\"")) {myString = myString.substring(1);}if (myString.endsWith("\"")) {myString = myString.substring(0, ...
- "AWT-EventQueue-0" java.lang.NullPointerException
- Thu, 15 Nov 2007 05:18:00 GMT
- I am changing an existing program that used to work fine in JRE1.3. When I upgraded to JRE 1.6, the dialog box hang and does not display ComboBox.Below is the code and the stack trace.import irsccmacros.back_end.common.ComboBoxItem;public class DefaultComboBoxRendererextends ...
- "Java Essentials" Related Questions
- "a"+"b"+"c", how many String objects created?
- Hello everyone,String s = "a" + "b" +"c";How many String objects are created?I guess 5, is it right?regards...
- "A reference to an ResourceRef" exception
- hi All,When the Server starts there's a problem with loading the WAR project. the exception is not a critical one and the application runs anyway, but I want to fix it anyway.[16:43:02:808 IST 07/03/05] 16d416d4 WebContainer A SRVE0169I: Loading Web Module: web_root. <-- the WAR ...
- ")" expected
- I'm using BlueJ to compile, and I'm getting a ")" expected on this line...while(i=0; i < col; i++){everything through the class has matching opening/closing brackets/parentheses.How can I fix this? int i; is declared, so is int col;Message was edited by: ...