Search found 24 matches

by jon80
Sun Aug 19, 2012 7:29 am
Forum: Java
Topic: cannot find symbol
Replies: 0
Views: 7555

cannot find symbol

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 int ...
by jon80
Tue Jul 17, 2012 1:27 pm
Forum: Java
Topic: Character literals?
Replies: 8
Views: 10986

Re: Character literals?

okay I will have a look, thanks
by jon80
Tue Jul 17, 2012 9:21 am
Forum: Java
Topic: Character literals?
Replies: 8
Views: 10986

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.
Oh ic, well I am reading the document at http://www.unicode.org/versions/Unicode6.1.0/ch02.pdf.
by jon80
Tue Jul 17, 2012 9:02 am
Forum: Java
Topic: Character literals?
Replies: 8
Views: 10986

Indeed. The page you refer to also explains Code points from the other planes (called Supplementary Planes) are encoded in UTF-16 by pairs of 16-bit code units called a surrogate pair... Did you read the whole of that page or the Oracle Java page it refers to? Yes, but I am down with coffee today ...
by jon80
Tue Jul 17, 2012 8:43 am
Forum: Java
Topic: Character literals?
Replies: 8
Views: 10986

Java's chars are 16 bits (4 hex digits) wide, enough to hold the characters of the basic multilingual plane. If you need to use wider ("supplementary") characters you'll have to use surrogate pairs. Or ints. UTF-16 (16-bit Unicode Transformation Format) is a character encoding for Unicode capable ...
by jon80
Tue Jul 17, 2012 7:01 am
Forum: Java
Topic: Character literals?
Replies: 8
Views: 10986

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.pdf. SCJP ...
by jon80
Sat Jun 16, 2012 1:49 pm
Forum: Java
Topic: DateFormat syntax error
Replies: 2
Views: 8259

Re: DateFormat syntax error

Oops, sorry about that, I should take coffee before coding :D
by jon80
Sat Jun 16, 2012 11:48 am
Forum: Java
Topic: DateFormat syntax error
Replies: 2
Views: 8259

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("it ...
by jon80
Tue Jun 05, 2012 5:27 pm
Forum: Java
Topic: Enable assert statements?
Replies: 0
Views: 7379

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 { public ...
by jon80
Fri May 25, 2012 8:05 pm
Forum: Java
Topic: Why doesn't JDK read from within a package?
Replies: 5
Views: 9495

I found a solution. file TestOne.java lies in a folder called one (otherwise, package one; would make no sense). so to find the way from TestOne to one/Dog.java, the classpath needs to contain the folder containing folder one (either relatively referenced by .. or as absolute path) Microsoft ...
by jon80
Fri May 25, 2012 6:19 pm
Forum: Java
Topic: error: cannot find symbol
Replies: 0
Views: 7445

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 ...
by jon80
Sat May 19, 2012 8:01 pm
Forum: Java
Topic: Why doesn't JDK read from within a package?
Replies: 5
Views: 9495

How is your classpath configured? Does it contain . (dot = current directory)? Yep Microsoft Windows XP [Version 5.1.2600] (C) Copyright 1985-2001 Microsoft Corp. C:\Documents and Settings\Jon>echo %CLASSPATH% .;C:\Program Files\Java\external_jars\junit4.9b2\junit4.9b2\junit-4.9b2.jar;C:\P rogram ...
by jon80
Sat May 19, 2012 2:03 pm
Forum: Java
Topic: Why doesn't JDK read from within a package?
Replies: 5
Views: 9495

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 completed with exit code ...
by jon80
Wed Jan 11, 2012 12:20 pm
Forum: General
Topic: error: cannot find symbol within package??
Replies: 0
Views: 393

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 marked ...
by jon80
Wed Sep 28, 2011 3:10 pm
Forum: Java
Topic: cannot find symbol [error]
Replies: 2
Views: 8317

your class CheckboxFrame is in a different package (musiccollection). So without import or fully qualified class name, it is not visible for MusicCollectionUI in package musicrecord. Btw, usually, package names (except for java's own packages) start with a top level domain, then the domain owned by ...