kunagu varun

Ranch Hand
+ Follow
since Apr 13, 2010
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 kunagu varun

Try Lynda.com's Java Essential Training and then, when you feel comfortable enough to start Android they have Android Development with Java Essential Training too. I'm wishing to start this venture coming year Good luck to you too. Happy Christmas and New year to all.
7 years ago
You need to learn using arrays and arraylists, your problem is similar to the one which is used to describe various concepts like polymorphism and arraylists in the book Head First Java... I think if you go through those chapters and understand those concepts, this problem would be a piece of cake
8 years ago
Thanks for the clarification Bert, I forgot to state that I am not preparing for any certification... I just want to start learn Java EE Technologies..
8 years ago
Hi, I love Head First approach...
I have completed Head First Java and now I want to learn Java EE Technologies.. I would like to start by learning JSP and Servlets from "Head First Servlets & JSP"
But I do have access to only the previous edition written for 1.4 Exam...

Can I continue to learn with this book or do I have to start with the 2nd edition of this book written for Java 1.5
8 years ago
ok.. I have used the setVisible(false) method to hide the frame1 of my first java source file. Now how can i activate and display the frame of second java source file. (i have named the frame as frame2)

I cannot use it as


The name frame2 is unrecognized by the intellisense of Eclipse IDE.. How can i activate and load the frame of second java file?

9 years ago
Hello friends, thank you very much for your quick replies and helped me a lot to solve my previous problem.
This time i have a different question.

How do i make a frame to be hidden and open another one when a button is clicked..

I have written this code in the actionperformed event of one button in frame1


But the error i receive is show() method is deprecated and as well as frame2 is not available. I mean it is treated as an undeclared variable. The intellisense didn't recognized it.

frame1 is one java file and frame2 is another one.

Please hep me to overcome the problem...
9 years ago
Thank you Mr.Jesper de Jong
Worked like a charm
9 years ago
Hello friends i am new to java programming. I am trying to develop a simple GUI based application to perform addition of two numbers.

Please have a look at my code


What i am expecting is whenever a user presses on the add button and if the input numbers are not provided then a message box much appear and display the error message.
The above code works fine and the box is also displaying but I need it to appear only after checking that if condition. If I place the JoptionPane line inside that if (Yes I have removed the block comment) nothing appears.

Hope you have understood my problem. Please help me guys
9 years ago
Thanks for the link.. I will try as you suggested and post back here later..
10 years ago
I feel sorry for my irregular post ranchers...
I have gathered some information regarding pipedIO and written the following code for my problem stated in the previous post..

Please have a look at this code..


The following is the output which i am getting..
0
1
1
2
2
3
3
5
5
7
8
13
21
34
55
89
144
233
377
610
987
1597
0
1
2
3
1
2
3
5
8
13
Terminated
5
7
21
34
55
89
144
233
377
610
987
1597
0
1
1
2

Please solve this issue..
10 years ago
Write a multi-threaded Java program to print all numbers below 100,000 that are both prime and fibonacci number (some examples are 2, 3, 5, 13, etc.). Design a thread that generates prime numbers below 100,000 and writes them into a pipe. Design another thread that generates fibonacci numbers and writes them to another pipe. The main thread should read both the pipes to identify numbers common to both.

Hello ranchers please give an idea of how to implement above problem...
10 years ago
Thank you very much for the replies... I will try the suggestions and post the results back...
10 years ago
Hello friends the following is a head banging problem i am currently suffering from.. please have a look at it..


Inside the while loop everything works fine.. The text file is opened and saved in the string array and printed..But out side the for,i am trying to print the saved array string, But i am getting only null as the output...

Please solve this issue...
10 years ago
ok thanks for replying. I will try it out and inform you back...
10 years ago
i have modified my code as little bit friends. Please have a look at it.



I will explain the flow of my code.
First for loop is to process numbers from 2 to 10. Then prints whatever the value is in i. lets say i=6
Inside this the second for loop is for this purpose. Iterate from 1 till the number before 6
Either (6%1) or (6/1) satisfies and sum<6 satisfies then
1.appending the factor (i.e 1) to the string
2.appending the "+" symbol to the string
3.storing the factor in the sum so that when sum has reached 6 then it wont enter this if segment.
So as per my code first 1 enters and appended to string and added to sum then 2 and 3 also performs the same procedure and the sum value now is 6.
Therefore the next value of j is 4 and for this value if condition is dis satisfied now and moves to the else block.
here i am checking whether sum is 6 or not. Obviously our sum is 6 here so the status of the perfect number is set to true by default and it will not be modified by else block.
Then it encounters the labeled break statement stop and exits the for inner for loop. Since the status is true,it must print the factors that make 6 as a perfect number. I think my logic is correct.
But i get the following output now.
Perfect Number Perfect Makers
-------------- --------------
2 1+
3 Not a Perfect Number
4 Not a Perfect Number
5 Not a Perfect Number
6 Not a Perfect Number
7 Not a Perfect Number
8 Not a Perfect Number
9 Not a Perfect Number
10 Not a Perfect Number

I dont understand where i have went wrong
Please look at the code once and reply to this..
10 years ago