Dmitry Golynkin

Greenhorn
+ Follow
since Aug 13, 2002
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Dmitry Golynkin

to Ivette:
It's nice that you want to help people who are walking behind you!
Please email your oppinions to me dimyan@ukr.net
21 years ago
I appreciate your welcoming, but I live in Ukraine - too far from London.
Put it your way
1. I did setup from cd to hdd. It unziped 123mb to my hdd.
2. In that path I found 3 subdirectories showed above.
3. When I tried to run some html from applets subpath - I thought that applets may be start this way - I saw browsers window can't run applet.
What can I do?
p.s. My browser (IE6) can run applets from a web.
[ August 29, 2002: Message edited by: Dmitry Golynkin ]
Hi Sam! I use jdk1.3+win98se
after installation I have 3 subdirectories
.applets
.javasdk
.media
In applets I have list of directories with html+applet.zip in each.
I'll appreciate your help
Yes, my JBuilder types the same. But why did it type compiler error? What is the border between copmiler and runtime errors?
code:

Explanation:
Line 2 is fine since array f1 contains elements of type G which is a subclass of F. The cast to G[]is needed, though, since the declared type of f1 is F[] and F is a superclass of G.
May be line 2 must be written one line below?
Can you explain me that line by line?
Thank you.
[ August 27, 2002: Message edited by: Dmitry Golynkin ]

I've seen no problem with Q5 - compiler could see that |this| stands on the second place. But in Q6 compiler doesn't know that |j| can't reached before R() construction. Why compiler error???
Thank you guys for previous answers!
[ August 27, 2002: Message edited by: Dmitry Golynkin ]
[ August 27, 2002: Message edited by: Dmitry Golynkin ]
Thank you Valentin!
[ August 27, 2002: Message edited by: Dmitry Golynkin ]
The output is 123546
(JBuilder 5 EE)
code:
__________________________________________________
public class Question41{
public static void main(String[] args){
Object[] obj = new Object[3];
for(int i=0;i<obj.length;i++)
obj[i] = (i%2==0)?new Object() : obj[i-1];
if(obj[0] == obj[1] & (obj[1]=obj[2])!=null)
System.out.print("1 "); //line 1
if(obj[1] == obj[2] && (obj[2]=obj[0])!=null)
System.out.print("2 "); //line 2
if(obj[1] == obj[0] || (obj[0]=obj[1])==null)
System.out.print("3 "); //line 3
if(obj[2] == obj[0] | (obj[0]=obj[2])!=null)
System.out.print("4 "); //line4
System.out.println((obj[0]==obj[1])+" "+(obj[1]==obj[2])+" "+(obj[0]==obj[2]));
}
}__________________________________________________
What bitwise | and & do in this case?
[ August 27, 2002: Message edited by: Dmitry Golynkin ]
[ August 27, 2002: Message edited by: Dmitry Golynkin ]
You make them faster than I can work them out
code:
__________________________________________________
Question 5
class D {
{System.out.print("1");}
static {System.out.print("2");}
D() {System.out.print("3");}
D(String s) {System.out.print("4");}
}
class E extends D {
{System.out.print("5");}
static {System.out.print("6");}
E() {System.out.print("7");this("e");}
E(String s) {System.out.print("8");}
}
class F {
public static void main(String[] args) {
new E();
}
}
compiler error
__________________________________________________
Question 6
class Q {
int i = 1;
{System.out.print("1");}
static {System.out.print("2");}
Q() {System.out.print("3");}
Q(int x) {System.out.print("4");}
}
class R extends Q {
int j = 2;
{System.out.print("5");}
static {System.out.print("6");}
R() {super(j);System.out.print("7");}
}
class S {
public static void main(String[] args) {
new R();
}
}
compiler error
__________________________________________________
I've seen no problem with Q5 - compiler could see that |this| stands on the second place. But in Q6 compiler doesn't know that |j| can't reached before R() construction. Why compiler error???
code:
__________________________________________________
import java.io.*;
public class Question05 {
public static void main(String[] args) {
Question05Sub myref = new Question05Sub();
try{
myref.test();
}catch(IOException ioe){}
}
void test() throws IOException{
System.out.println("In Question05");
throw new IOException();
}
}
class Question05Sub extends Question05 {
void test() {
System.out.println("In Question05Sub");
}
}
__________________________________________________
public class Question20 {
public static void main(String[] args) {
Question20 myref = new Question20Sub();
try{
myref.test();
}catch(Exception e){}
}
void test() throws Exception{
System.out.println("In Question20");
throw new Exception();
}
}
class Question20Sub extends Question20 {
void test() {
System.out.println("In Question20Sub");
}
}
__________________________________________________
I can see that the subject is a type of exception. But why 05 doesn't compiles while 20 compiles fine?