Win a copy of Mastering Corda: Blockchain for Java Developers this week in the Cloud/Virtualization forum!

Varun Goenka

Ranch Hand
+ Follow
since Mar 09, 2009
Mumbai
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 Varun Goenka


The idea is to get used to file input and output streams.If that makes you angry, sorry, but I could still use some help.

Getting down to buisness, what this code does is, accept a file read it print it and then edit it ,IF THE USER WILLS SO.

The complication probably arises because I wanted to make sure the program does not terminate incase the user plans to input an alphabet incase of an int.

Which is why you'll probably see many do ......whiles.
11 years ago
11 years ago
illegal escape character
11 years ago
FileReader var1 = new FileReader("anthony gonsalves.txt");

Lets just consider the case of anthony gonsalves.txt not being in the same folder as the Java app.

How does one code then?
11 years ago
Alternatively, please, direct me towards a tutorial that begins with reading and writing of files (not strings,bytes...........but FILES).
I could very honestly use some help in here!
11 years ago



What i am essentially trying to do is see what happens when I run this, but, I have no idea whats happening with the that argument over there.
11 years ago
Does a char variable have some default value? Like garbage value?
11 years ago
Once a thread enters the monitor on a synchronized method it cannot be blocked or it cannot sleep right?
11 years ago
Explain to me all the basic's of the wait method and how to use it to suspend and/or block a thread.also tell me how does one stop a thread?
Please help me!
11 years ago
Why not use an arraylist Brandon?
Your code will be cleaner and you really wont be held back by the limitations that arrays come along with.
Come on you are dealing with objects anyways why use a clunky solutio like array???
11 years ago
Method overloading deals with 2 different methods in the same class, while overriding deals with the same method present in different classes.

Polymorphism deals with the latter.
11 years ago
Raj please note this polymorphism is a concept that deals with "same" methods in "different" classes.
Polymorphism is what happens; when you call a method, on a reference; that happens to be of a class that has been extended to another class having that method.

Well.....thats technically correct but lets be frank that sentence will take some time to understand.
But you can always rote learn that sentence and give it to your professor .
11 years ago
I have seen the wait method being called without any reference.
Even if its static (in case it is; i dont know) should you not write the class name.

Also what exactly is the currentMethod() method and when did it replace new class_name()???
11 years ago
So we can like,use the sleep method, pointlessly, just for fun even though we arent using any thread.
Make things work slowly to "corroborate" the fact that java is slow?
11 years ago
Please tell me one thing then,
the JVM "makes" a "main thread" out of the main method written by us?
Is it so?
11 years ago