Any idea why this won't compile please?
/**
* Java Program which tries to implement variable argument method using
* method overloading. This started get clumsy once number of parameter exceeds
* five.
*/
class VarargsExample{
/*
* @return multiplication of all numbers in array
*/
public ...
Search found 22 matches
- Sun Aug 19, 2012 7:29 am
- Forum: Java
- Topic: cannot find symbol
- Replies: 0
- Views: 11778
- Tue Jul 17, 2012 1:27 pm
- Forum: Java
- Topic: Character literals?
- Replies: 8
- Views: 17854
Re: Character literals?
okay I will have a look, thanks
- Tue Jul 17, 2012 9:21 am
- Forum: Java
- Topic: Character literals?
- Replies: 8
- Views: 17854
Oh ic, well I am reading the document at http://www.unicode.org/versions/Unicode6.1.0/ch02.pdf.ben_josephs wrote:How you do it depends on the requirements of whatever function you're going to pass it to.
And I've never done it, so I don't have an example.
- Tue Jul 17, 2012 9:02 am
- Forum: Java
- Topic: Character literals?
- Replies: 8
- Views: 17854
- Tue Jul 17, 2012 8:43 am
- Forum: Java
- Topic: Character literals?
- Replies: 8
- Views: 17854
- Tue Jul 17, 2012 7:01 am
- Forum: Java
- Topic: Character literals?
- Replies: 8
- Views: 17854
Character literals?
Why is the following incorrect syntax?
class CharactersInPlay
{
public static void main (String[] args)
{
char a = 'u\16848'; //I tried escaping i.e. 'u\\16848', and, also other characters
System.out.println(a);
}
}
References
Banum Unicode Chart at http://www.unicode.org/charts/PDF/U16800 ...
class CharactersInPlay
{
public static void main (String[] args)
{
char a = 'u\16848'; //I tried escaping i.e. 'u\\16848', and, also other characters
System.out.println(a);
}
}
References
Banum Unicode Chart at http://www.unicode.org/charts/PDF/U16800 ...
- Sat Jun 16, 2012 1:49 pm
- Forum: Java
- Topic: DateFormat syntax error
- Replies: 2
- Views: 13331
Re: DateFormat syntax error
Oops, sorry about that, I should take coffee before coding 
- Sat Jun 16, 2012 11:48 am
- Forum: Java
- Topic: DateFormat syntax error
- Replies: 2
- Views: 13331
DateFormat syntax error
The following code does not compile in TextPad 5.4.2, although similar code compiles within Eclipse.
import java.text.*;
import java.util.*;
class DateFormatPlay
{
Calendar c = Calendar.getInstance();
c.set(2012, 11, 25); //christmas day due to zero based indexed month
Locale l = new Locale ...
import java.text.*;
import java.util.*;
class DateFormatPlay
{
Calendar c = Calendar.getInstance();
c.set(2012, 11, 25); //christmas day due to zero based indexed month
Locale l = new Locale ...
- Tue Jun 05, 2012 5:27 pm
- Forum: Java
- Topic: Enable assert statements?
- Replies: 0
- Views: 11511
Enable assert statements?
It would be nice if the developers of TextPad 5.4.2 decided to implement the functionality which automatically runs the following command when an assert statement is detected in the code. The option is commonly accessible through Tools > External Tools > Compile (Ctrl + 1).
class Assertion ...
class Assertion ...
- Fri May 25, 2012 8:05 pm
- Forum: Java
- Topic: Why doesn't JDK read from within a package?
- Replies: 5
- Views: 15379
- Fri May 25, 2012 6:19 pm
- Forum: Java
- Topic: error: cannot find symbol
- Replies: 0
- Views: 11787
error: cannot find symbol
The following does not compile within TextPad 5.4.2, and, the support team commonly tells me that they do not support these issues, so I write them here. I cannot force them to understand a bug if they do not want to listen.
It works within Eclipse.
Dog.java
package one;
class Dog
{
public Dog ...
It works within Eclipse.
Dog.java
package one;
class Dog
{
public Dog ...
- Sat May 19, 2012 8:01 pm
- Forum: Java
- Topic: Why doesn't JDK read from within a package?
- Replies: 5
- Views: 15379
- Sat May 19, 2012 2:03 pm
- Forum: Java
- Topic: Why doesn't JDK read from within a package?
- Replies: 5
- Views: 15379
Why doesn't JDK read from within a package?
package food;
class Dog
{
}
package food;
class Terrier extends Dog
{
void walk()
{
System.out.println("Terrier walks");
}
}
Error
C:\Documents and Settings\Jon\Desktop\food\Terrier.java:2: error: cannot find symbol
class Terrier extends Dog
^
symbol: class Dog
1 error
Tool ...
class Dog
{
}
package food;
class Terrier extends Dog
{
void walk()
{
System.out.println("Terrier walks");
}
}
Error
C:\Documents and Settings\Jon\Desktop\food\Terrier.java:2: error: cannot find symbol
class Terrier extends Dog
^
symbol: class Dog
1 error
Tool ...
- Wed Jan 11, 2012 12:20 pm
- Forum: General
- Topic: error: cannot find symbol within package??
- Replies: 0
- Views: 538
error: cannot find symbol within package??
"Instance methods can be overridden only if they are inherited by the subclass.
A subclass within the same package as the instance's superclass can override
any superclass method that is not marked private or final.
A subclass in a
different package can override only those non- final methods ...
A subclass within the same package as the instance's superclass can override
any superclass method that is not marked private or final.
A subclass in a
different package can override only those non- final methods ...
- Wed Sep 28, 2011 3:10 pm
- Forum: Java
- Topic: cannot find symbol [error]
- Replies: 2
- Views: 13418