Win a copy of Murach's MySQL this week in the JDBC and Relational Databases forum!

Aqsa Anum

Greenhorn
+ Follow
since Oct 24, 2016
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
4
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Aqsa Anum

Rob Spoor wrote:Would you mind sharing how you solved it? That way, others who have the same issue can benefit as well.


I have used
7 years ago
Hi Everyone.
I am making a text editor in C# wpf. It is working well, but when I prompt user to save text, if user clicks on cancel, application also gets close. Please suggest me how can I solve this error.
Thanks!
7 years ago

Aqsa Anum wrote:Hi Every One,
I made button in C# and I want to align it in center, please help me how can I do it ?



No need of replies, Resolved
7 years ago
Hi Every One,
I made button in C# and I want to align it in center, please help me how can I do it ?

7 years ago

Junilu Lacar wrote:Neither of those are good explanations of the concepts you are associating with them.

Sure, all Java classes are subclasses of the base Object class but that's like saying that people are carbon-based organisms. You need to be more specific to understand the concept more deeply.

Is-a relationships in Java are established through the extends and implements keywords.

So if you write class B extends A, you are saying that B "is a" kind of A.

When you write class D implements C, this means that instances of class D can be assigned to reference variables of type C because any D object "is an" implementation of the C interface.



Can you give a little coding example on "implements" in java ?
7 years ago

Aqsa Anum wrote:

Junilu Lacar wrote:

Aqsa Anum wrote:
Please tell me, what are these good reasons ?
Thank you


By making the TestClass as public and the others non-public, you are implying that TestClass is more important than the others. Why would a class that is used for testing be more important than the classes that are being tested?



But I think we can do in this way




Sorry Mistake

7 years ago

Junilu Lacar wrote:

Aqsa Anum wrote:
Please tell me, what are these good reasons ?
Thank you


By making the TestClass as public and the others non-public, you are implying that TestClass is more important than the others. Why would a class that is used for testing be more important than the classes that are being tested?



But I think we can do in this way
7 years ago

Norm Radder wrote:Are each of the classes outside of the other classes?



At that time these were not, but now I separated each class and it is working fine
7 years ago

Junilu Lacar wrote:

Aqsa Anum wrote:
Please tell me, what are these good reasons ?
Thank you


By making the TestClass as public and the others non-public, you are implying that TestClass is more important than the others. Why would a class that is used for testing be more important than the classes that are being tested?



You said right, there are two other classes too, which are more important than testing class. Then Different notepad files for each class looks fine.
But if we want to do it in NetBeans, How we will code it ? Would there also be distinct files for each class ?
7 years ago

Aqsa Anum wrote:

Swastik Dey wrote:Why not.  



Save it as TestClass.java.




Thanks




Here I am getting one error, when I did this.
7 years ago
Use if and else if statements. I hope you learnt it in C/C++ (IF you studied C/C++ before)
Good Luck
7 years ago

Junilu Lacar wrote:

Aqsa Anum wrote:

Swastik Dey wrote:Why not.  

Save it as TestClass.java.


Thanks


You should note that there are good reasons to NOT do it this way.



Please tell me, what are these good reasons ?
Thank you
7 years ago

Campbell Ritchie wrote:Welcome to the Ranch

Apart from trying to put three classes in one file, are you getting everything else to work?



Yup I am getting everything else to work
7 years ago

Swastik Dey wrote:Why not.  



Save it as TestClass.java.




Thanks
7 years ago
Hey everyone!
I made Address Book in Java, for this I have had to make three notepad files for three different classes. Can I put these three classes in one file and if yes, How can I ?

First File:




Second File:




Third File:


7 years ago