Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
Unknown Quality Score

No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.

0 Endorsements
Ranked #2K
~11.1K People Reached
Favorite Forums

23 Posted Topics

Member Avatar for purijatin

I have a barcode scanner. So when the barcode is scanned using a gun, the value normally is entered to textfield placed on the screen. So I have made an excel macro. And when the barcode is scanned, the text appears on the cell ending with the new line character …

Member Avatar for adam_k
0
117
Member Avatar for hackit

It is simple, in java by default all calls on primitives are : call be copy. And for non-primitives its call be reference. Example: [CODE] void foo() { Object a = new Object(); foo2(a); } void foo2(Object b) { //So here, be definition b will point to the same Object …

Member Avatar for JamesCherrill
0
197
Member Avatar for purijatin

Hello, The problem is that some how due to garbage collection timings I am having tradeoff's in my performance. The issue can be generalized as: [CODE] public void loop(BlockingQueue<Runnable> queue) { for(Runnable runnable : queue)//line2 { runnable.run();//line4 if(Math.random() > 0.9) System.gc();//line5 } //line7 } [/CODE] Now normally the queue passed …

Member Avatar for purijatin
0
134
Member Avatar for purijatin

In a folder I only have 2 files. Main.java and ArrayQueue.class Main.java is the following: [CODE] class Main{ public static void main(String args[]) { ArrayQueue s = new ArrayQueue() }} [/CODE] But it throws an error stating the following: C:\Users\Jatin\Documents\NetBeansProjects\JavaApplication3\src\Main2.java:11: cannot access ArrayQueue bad class file: C:\Users\Jatin\Documents\NetBeansProjects\JavaApplication3\src\ArrayQueue.class class file has …

Member Avatar for purijatin
0
109
Member Avatar for purijatin

In the below code, iam calculating the time taken to calculate the Square Root of first 30000000 numbers. But there is a weird thing happening: [CODE] import java.util.*; public class Cache { public static void main(String args[]) { for(int j=0;j<=1000;j++) { ; } float[] a = new float[30000000]; long as …

Member Avatar for purijatin
0
195
Member Avatar for newbie14

Instead of Timer, use ScheduledThreadPoolExecutor, it removes several ambiguities and risks from Timer .In Timer if the thread throws Exception,it ends and other tasks are not executed. In ScheduledThreadPoolExecutor, this is taken care of. And also if the delay period of waiting tasks is near to over, it makes new …

Member Avatar for newbie14
0
122
Member Avatar for LianaN
Member Avatar for LianaN
0
456
Member Avatar for Janu Sam

Hi, this is happening because no values have been assigned to the array, and hence it is throwing NullPointerException. Assign individual values to all the elements in the array and try again

Member Avatar for Janu Sam
0
401
Member Avatar for purijatin

Can some one please suggest a good advanced book on Concurrent Processes. I am a bit week in it and would like to give a lot of time to improve

Member Avatar for Ezzaral
0
86
Member Avatar for purijatin

The problem is that when we use multiple threads and each containing System.out.println(). It doesnt print at time according to what i think it shoud On implementing the below 2 codes: [CODE] import java.net.DatagramPacket; import java.net.DatagramSocket; import java.net.SocketException; import java.util.concurrent.LinkedBlockingQueue; import java.util.logging.Level; import java.util.logging.Logger; class E { LinkedBlockingQueue<DatagramPacket> li = …

Member Avatar for purijatin
0
242
Member Avatar for purijatin

I am facing this problem where one thread keeps adding packets which it receives from the network to linkedlist. And the other thread retrieves it from the linked list. The below is the code of the Thread which keeps receiving the packets and add's them to list. [CODE] private class …

Member Avatar for JamesCherrill
0
99
Member Avatar for purijatin

Hello I am making an project in Netbeans and the following is my problem: I deleted some of my .java files of my project and later copy pasted the same files. Now the code runs perfectly fine but Netbeans doesnt detect the packages. I mean inside the code it shows …

Member Avatar for purijatin
0
110
Member Avatar for AngelicOne

If you are new to Java then i would recommend start with notepad or Jcreator. Later on you can shift to an IDE like Netbeans or eclipse.

Member Avatar for purijatin
0
58
Member Avatar for purijatin

Hello! Can someone please suggest a way to effectively copy the bytes from one array to another. In my program a user will call the method setDate(byte[] buf) which will set data continuously ie inside the method there is an array say buf2. for example if the method is called …

Member Avatar for purijatin
0
5K
Member Avatar for purijatin

What is the maximum size of one Datagram Packet java makes. Iam implementing my own protocol with defined features which runs over UDP. For every packet i have defined a set of headers. Now these headers are to be defined in every packet. So unless i do not know the …

Member Avatar for NormR1
0
115
Member Avatar for purijatin

Hello For example if i want to implement my own protocol, i can proceed by implementing the extra features on UDP on the application it self and thus achieving my task. But what if i want to implement it on the OS level just like TCP or any other protocol, …

Member Avatar for masijade
0
124
Member Avatar for purijatin

Hello For example if i want to implement my own protocol, i can proceed by implementing the extra features on UDP on the application it self and thus achieving my task. But what if i want to implement it on the OS level just like TCP or any other protocol, …

0
60
Member Avatar for purijatin

Iam unable to run programs from command prompt, my environment variables are correct. When i type javac on command prompt ,it gives the correct data ie possible outputs. When i type java it again responds as it should. But if i run a program say: java practice then it gives …

Member Avatar for peter_budo
0
306
Member Avatar for Leigh Reed

yeah thats because you have set the tax as 55c,so it will remain as that only,how will its value change if you havent made any calculation to tax

Member Avatar for Leigh Reed
-1
140
Member Avatar for purijatin

hello!When in the below code if iam using a local address instead of yahoo.com,it is executing well,but if iam not using a local address then it is giving a java.net.SocketException.I use a proxy connection and i have set my proxy for java .pl help [CODE]import java.net.*; import java.io.*; import java.io.*; …

0
60
Member Avatar for Ryujin89
Member Avatar for purijatin

can you pl help me out on this problem ..i have spent a lot of time on this question but iam unable to find the answer What if i want to write a class in such a way that only one instance of it can be created , and anyone …

Member Avatar for JamesCherrill
0
2K
Member Avatar for purijatin

class A { void show() { System.out.println("show"); } } class B extends A { void disp() { System.out.println("disp"); } } class Prac2 { public static void main(String args[]) { A ob = new B(); ob.disp(); } } /*this thing shows an error */ now my question is :i thought we …

Member Avatar for purijatin
0
122

The End.