• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Jeanne Boyarsky
  • Tim Cooke
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Mikalai Zaikin
  • Carey Brown
Bartenders:

I have questions about java,netbeans vs

 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi.I am an university student and I want to learn Java.I studied pascal and c about 6 months.Now i need learn OOP and i decided on Java.Because I think platform-independent matter is important.I studied a few weeks on Netbeans ide and allways stucked and had a lot of questions.I hope i can got answers here<i see you like help others :> >. I have tons of questions

1-Netbeans doesnt allow modify generated code.For example i have class method to connect db and take a String array.I have a main class where all window code in generated by netbeans.I have a Jlist and i am trying to make the list what i got from method(i tryed right click and binding but i couldnt see bind my method).I succesed this using a notepad but whenever i add a new swing components Netbeans removes my code.For example



After add another components netbeans change my code and i take a error.




2-I know here is for java but i must ask a question about Netbeans not related java.When i work on Design i cant do fast copy and paste pressing to button and shift key.I hit to button i am pressing to shift key and moving mouse nothing happens.<this can be really dummy question:sorry>

3-After i finish window design how i can change look and feel feature.For example how to make possible seen my program as Nimbus,Motif etc or a list to user can select it.

4-My friends say Java code is hard to learn,c# much easier and Java programs are very slow,not stably.They are allways coding in C# using sql server dbms and also our teachers use Microsoft related products.I really want too much learn java linux etc.But if i go on like this(i am very slow proceding in learn this things) i must try this tecnologies ?

5-I am still searching where i can got help from others.I found a lot of places but i read people's questions and answers.i even dont understand and this feels lonely.There is a great plug in Netbeans name is Collaboration.How i can contact ppl with this tool ?

I am allways searching about my java related problems.(my dream is learn java desktop applications and oracle).Reading books,looking to tutorials,searching in google.But as i said I am learning very very slow.For example i even tryed 1 days to connect a mysql db from java.I found i failed bcz i must add myql library to project library(this is really annoying).Anyway i hope you can help me.At least dont be shy to say "forget it! go to play Diablo click clik dumbass" to me.
 
Ranch Hand
Posts: 624
IntelliJ IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello and welcome to Java Ranch.

I can answer some of your questions. I'm sure other people will answer the others and expeand on my answers.

#1 - I've not used NetBeans in many many years (I currently use a different IDE), but most IDEs when being used to generate GUI based code do not allow for manual alteration of the code, or at least not easily. I personally would recommend hand writing your code from scratch while you are first learning. That way you can make changes and can understand the code better. Than when you start using the IDE to generate the code, you will have a better understanding of what it is doing.

#2 & #3 - you night want to ask these questions in the IDEs, Version Control and other tools forum. Since I haven't used NetBeans in years, I can't answer these. But see my discussion on using an IDE below in the answer to #5.

#4 - Java is just as fast as C#. The statement that Java is slow is an old and unfortunate myth about Java. And one that is constantly perpetuated by some people who prefer the C, C++ or C# languages. In its very early days of its life (1995), Java was slower than it is today; but it was never so slow as to be unusable. It was more with client side code than server side code that it was a bit slower. Nevertheless, it was never as slow as some people like to make out. But with better processors today, and vast improvements in Just In Time Compiling, Java is just as fast as C or C#. In fact I have seen demos where Java was faster than C. And speed depends more on the quality of the code and the skill of the developer. Bad code in any language will be slow.

Opinions will vary greatly on this subject. And unfortunately too often opinions on the subject are stated as if the are fact. It is a very emotional subject for some. My advice would be to simply ask anyone who says Java is slow to prove it with hard facts that are current. In regards to C# being easier to learn, that is hard to say. One advantage -- or disadvantage depending on your perspective -- of C# is that everything is done by Microsoft - C# the language, the IDE, the OS you will being using, etc. This might make it a bit easier to learn for some. But for others it may make it harder. Again, this is an area where people's opinion will differ. If you want to be able to program on Linux, then I would suggest sticking with Java, or learning C++, but not C#. Java can be written on any platform, and then run anywhere. So you can learn Java on Windows for now, and then when you are ready to learn Linux, you can run your Java programs on it and will not have to learn anything new about the language. If you use C++, you can learn on Windows, but when you move to Linux, there will be a bit of learning to do since compiling C++ code on Linux can be different than on Windows. And C#, to the best of my knowledge, cannot be run on Linux. One thing you will learn is that when it comes to language selection, people can be very opinionated about their language of choice. Some C++/C# users will tell you how crappy Java is because they are C++/C# users. Likewise some Java users will tell you how crappy C++/C# are because they are Java users. They are all good languages, but are used by different people. In my humble opinion, I think you will find more resources for learning Java than C# since many universities use Java as their language when teaching. That's not to say you won't find things on C#. I just think you will find more on Java. But again, I am a strong Java user of many years, so my perceptions are naturally biased because of that.

#5 - My advice is to concentrate on learning Java first... without using an IDE. Right now it seems as if you are trying too hard to learn the IDE and that is preventing you from learning the language. The best developers I work with learned to program outside and IDE first. An IDE like NetBeans is a very powerful tool. But to use it effectively, you need to understand the under workings of a language first. I cannot stress this enough. It's like people who only know how to use a calculator but cannot add 2 + 3 by hand. If you read other posts here at JavaRanch, you will see many others will provide this advice.

As for a suggestion of where to start, try the book Head First Java, Second Edition. It is one of the best Java books on the market and has been a #1 selling book for many years. Work through the exercises in the book. If you have questions, you can ask here in the forums. Type the sample code in and play with it. See what happens when you change things. The best way to learn to program is to experiment. You can look at The Java Tutorial which walks you through some of the basics in Java. You can also look at the Cattle Drive here at JavaRanch. The Cattle Drive is a self paced tutorial you can work through with exercises. And you can get feedback on the exercises as you do them.


In regards to your statement:

I found i failed bcz i must add myql library to project library(this is really annoying).



This is one of the things that makes Java so powerful. I can write database code in Java and then run it against a MySQL DB, Oracle DB, Hypersonic DB, Derby DB, SQL serve DBr, or any number of other databases simply by changing a library file. And I can run it on any OS. That is very powerful. An unfortunate part of that powerfulness is that it can make learning the language a bit more challenging because it might not be quite as quick to use. You are not just up and running instantly because everything is preconfigured for you. But in the long run, it will allow you to write much more powerful code. Hanging in there through that learning process will provide great rewards in the end.

Try not to learn too much at once. Take your time and learn one thing at a time. You are asking questions in this post about an IDE, a plug-in for an IDE, Java, GUI code, and databases. These are all hefty topics on their own. Combine, it is a lot for anyone to learn all at once.
 
Marshal
Posts: 78698
374
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Welcome to JavaRanch (again)

I agree with Mark's advice, but it may be possible to run C# code on other platforms with the Mono project (C# compiler etc).
Please avoid abbreviations like ppl and bcz: read this FAQ.
 
ozhan kaya
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for advices.I will try my best.
 
Ew. You guys are ugly with a capital UG. Here, maybe this tiny ad can help:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic