janne kallio

+ Follow
since Oct 13, 2003
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by janne kallio

Hi Mohana.
I would appreciate a copy of the SCJP PPT format.
Please forward them to japeka@jippii.fi

Sridhar Srinivasan,
When do you plan to take the exam?
Try to be patient with me. Again I am wondering about
the following thing:
My code looks like this:
boolean te=true; //here I assign te variable to true
if(te=false) //here I don't compare the variable, but reassign it to false
//and according to my understanding, here the expression assignment is
//done, hence, te=false, resulting in true. Shouldn't it then output true
//and not false?
//Does the compiler decide where to go based on the expression result
//succeeding or based on result turning te-variable to false?
Thanks again! JK
[ February 06, 2004: Message edited by: janne kallio ]
Thanks Ray!
Are you already JSCP?
I got it. It is because of = and operations with literals
byte d=2;
is understandable...
byte d=2+2;
byte d=(33+3)*1;
are as well.
[ February 05, 2004: Message edited by: janne kallio ]
Wondering about the following;
int ty=2;
int ta=3;
byte b=ty+ta;
I understand that due to b, which is byte, compiler error is created.
To correct the code,
byte b = (byte) (ty+ta);
cast is needed,
but why this code below will compile without error??
byte d = 3+4;
Ok, I got it.
Thanks! I haven't yet reached that part in the S&B book. That's why the confusion.
Congratulations, Cathy, for your excellent score!
package food;
public abstract class Fruit {
abstract void setColor(); //default modifier
abstract void setWeigh(); //default modifier

The access modifier of the abstract methods of class Fruit is default. This means that classes and subclasses of Fruit outside package food cant access the methods.
Cathy, are you saying that though I declared my Fruit class as public, it is considered as default access modifier, not as public modifier.
Wondering about the following code:
In one file I have got the code:
package food;
public abstract class Fruit {
abstract void setColor();
abstract void setWeigh();
and in JC26112003_6.java file I have the code as follows;
import food.Fruit;
class Apple extends Fruit {
void setColor(){}
void setWeigh(){}
public class JC26112003_6 {
Why am I getting compiler error out of this?
Apple should be declared abstract
Grateful to your explanation!
Hi J-gurus!
Wondering about how I am supposed to understand the following type of question in one book preparing for JSCP certificate. The question was...
What is the numerical range of a char?
This option was given as one choice -(2^15) to (2^15)-1
My opinion is that I should count above statements as bitwise operation as follows:
0000010 2
^ 0001111 15
0001101 13
But not as Math.pow(2,15)
Am I right?
Wondering about the following code.
int s[];
s=new int[3];
s[0]=new int[2];
Why does this cause compile error?
Hi again!
I am having problems with figuring out the usage of Java's asssertions. I know that they are primarily intended for testing reasons and they can disabled/enabled etc.
But can anyone of you give me an example how these assertions related things can be tested in the exam? Can f.ex anyone that already has passed the programmer test, recall from their experiences how this feature was tested in their particular exam?
I would appreciate your experiences very much!
Hi all Java gurus!
Can anyone give me a good example of usage strictfp modifier in front of class and method? I mean when it is a really must for using this modifier.
Thanks again!
Hi there again!
I am wondering about this strange thing about using public modifier in my classes and error messages afterwards when the files being compiled.
Like, let's say, my code look like this
public class A {
public class Tester {
public void main(String args[]){
Error message is:
C:\javasert\JavaSertHarj\src\JavaSertifikaatti\JC16102003.java:8: class A is public, should be declared in a file named A.java
public class A {
C:\javasert\JavaSertHarj\src\JavaSertifikaatti\JC16102003.java:11: class Tester is public, should be declared in a file named Tester.java
public class Tester {
I am not getting the point. Pls could anyone help me with this?