Win a copy of Micro Frontends in Action this week in the Server-Side JavaScript and NodeJS forum!

Gokhan Gultekin

Greenhorn
+ Follow
since Jun 23, 2001
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 Gokhan Gultekin

Deitel&Deitel is a good book for people with no programming background, easy to read and comes with lots of sample code. But in my opinion it doensn't cover the nitty-gritty stuff in Java which we will probably face in tghe rael thing.
my .2
Gokhan
Does this rule also apply to Runtime Exceptions?
I mean can a subclass throw a Runtime Exception which is not thrown by the superclass ?
Cheers,
Gokhan
Try to increase the E value.
Try:

c:\command.com /P/E:8192
and in config.sys
shell =c:\command.com c:\ /P/E:8192
It worked for me when i had a similar problem installing the tomcat server on a Windwos ME machine.
Migth also work for you.
Cheers,
Gokhan
Thanks guys it is more clear now . . .
Thanks eveyone, it is clear now....
Actually can u tell me the reason why the following code doesnot compile.
thanks in advance. gokhan
class BaseClass{

public BaseClass(String s){
System.out.println(s);
}

public BaseClass(int i){
this("I am BaseClass Integer");
}
}

public class SubClass extends BaseClass{

public SubClass(int i){
System.out.println("I am SubClass Integer");
}

public static void main(String[] arg){
SubClass sc = new SubClass();
}
}
can someone pls explain why class D ends with the output "True" but class E with false...
Thanks gokhan
class D
{
public static void main(String[] args) {
String s1 = new String("hello");
String s2 = new String("hello");
if (s1.equals(s2))
System.out.println("equal");
else
System.out.println("not equal");
}
}

class E {
public static void main(String[] args) {
StringBuffer sb1 = new StringBuffer("hello");
StringBuffer sb2 = new StringBuffer("hello");
if (sb1.equals(sb2))
System.out.println("equal");
else
System.out.println("not equal");
}
}
Thanks Tamanna,
Your post was really a bit of a relief for me.
Hi all,
can somenone pls explain me when we shd provide a null parameter constructor in a class to avoid compile time errors in the subclass of this class.
Thanks in advance
Has anyone tried th mock exam applets that are the 5th and 27th links in Maha's list of free mock exams?
I found th equsetions a little bit hard. Are all the questions that the real thing? I mean some of the questions require you to compile a code by pen and paper more than testing the fundamentals of Java.
I am taking the test in a couple weeks and those ones upset me a bit..
Any comments?
Cheers, Gokhan
Thanks Jason for correcting me. Actually what I tried to mention was also open source. A stupid mistake.
Cheers, Gokhan
19 years ago
Well i think it is a bit early to talk like that...It is ofcourse not possible for people who can only use MSOffice to switch to Linux. And ur right the transition is not that easy but then why is Microsoft so afraid of OpenGL and the executives of Microsoft is trying to put it down everyday in the press. Because they think it is a threat for them..there is huge support for OpenGL from big companies which hate Microsoft. So it will be really interesting to see what will happen..
19 years ago
Hi Deepak,
stop() is a deprecated method in Java 2. So it is normal you get a warning message from the compiler. But you should be able to compile the program. The API documentations says:
-----------------------------------------------------------------
void stop()
Deprecated. This method is inherently unsafe. Stopping a thread with Thread.stop causes it to unlock all of the monitors that it has locked (as a natural consequence of the unchecked ThreadDeath exception propagating up the stack). If any of the objects previously protected by these monitors were in an inconsistent state, the damaged objects become visible to other threads, potentially resulting in arbitrary behavior. Many uses of stop should be replaced by code that simply modifies some variable to indicate that the target thread should stop running. The target thread should check this variable regularly, and return from its run method in an orderly fashion if the variable indicates that it is to stop running. If the target thread waits for long periods (on a condition variable, for example), the interrupt method should be used to interrupt the wait.
-----------------------------------------------------------------
so what should you use instead of Thread.stop?
------------------------------------------------
Most uses of stop should be replaced by code that simply modifies some variable to indicate that the target thread should stop running. The target thread should check this variable regularly, and return from its run method in an orderly fashion if the variable indicates that it is to stop running. (This is the approach that JavaSoft's Tutorial has always recommended.) To ensure prompt communication of the stop-request, the variable must be volatile (or access to the variable must be synchronized).
For example, suppose your applet contains the following start, stop and run methods:
private Thread blinker;
public void start() {
blinker = new Thread(this);
blinker.start();
}
public void stop() {
blinker.stop(); // UNSAFE!
}
public void run() {
Thread thisThread = Thread.currentThread();
while (true) {
try {
thisThread.sleep(interval);
} catch (InterruptedException e){
}
repaint();
}
}
You can avoid the use of Thread.stop by replacing the applet's stop and run methods with:
private volatile Thread blinker;
public void stop() {
blinker = null;
}
public void run() {
Thread thisThread = Thread.currentThread();
while (blinker == thisThread) {
try {
thisThread.sleep(interval);
} catch (InterruptedException e){
}
repaint();
}
}

Hope this helps....
Cheers, Gokhan......
Hi Sylvia,
I also read about the layoff of 340 people in PCCW today. Most of them from e-commerce dept. ha?.. Not a big surprise.
I reckon in next couple of years it will be again between the evil empire of Gates and the others(IBM, Sun, Oracle, etc.)
Microsoft is seriously keeping an eye on the OpenGL issue. I think they are bit annoyed hearing that IBM is investing about $1billion for Linux and OpenGL. That absolutely makes sense because IBM will want to end the Microsoft monopoly on the desktop. Linux was around and it was always strong an robust on the serverside and supporters of Linux want to make it stronger on the desktop and give an end to MS's domination. I got a version of Red hat 7.1 last month. It can be installed both as a server and worksation. And it is a lot easier to configure than the previous versions. You can configure almost everything by using menus. So in my opinion it will be the competition between Linux and Microsoft in the next couple years.
Sun is also giving full support to Linux because there is no resistance for the deployment of Java on this platform an as it becomes widely used Sun will definitely benefit from this. Ofcourse at the moment the out-from-the-shelf solutions are more attractive for most people. But how long can these small and medium companies bear the costs and keeping Gates the richest man on earth? Linux and OpenGL is definitely more cost effective
than MS.
So the war between OpenGL and Microsoft will be the issue in the future. And since Java is on the OpenGL side, to some extent, the future of Java also depends on the winner of this war.
My .2.
Cheers.
19 years ago