Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / NewStats: 3,195,487 members, 7,958,477 topics. Date: Wednesday, 25 September 2024 at 03:15 PM |
Nairaland Forum / Science/Technology / Programming / How Long Did It Take You Guys To Become Strong Java Programmers (5800 Views)
Help Me Out Java Programmers / Java Programmers ,I Need Help Fixing This Code. / How Are You Guys Coping With International Ban On Cards (2) (3) (4)
How Long Did It Take You Guys To Become Strong Java Programmers by Fulaman198(m): 6:35am On Jan 07, 2016 |
I just want to check and see everyone's insight on this. |
Re: How Long Did It Take You Guys To Become Strong Java Programmers by Dekatron(m): 7:06am On Jan 07, 2016 |
Looks like I was right in time Please how do I get input in java?? Like . . I want to accept a string & then print. . . I am confused on the BufferedReading and Scanner. I did :- String c1 = getInput("Enter a colour" It said I should create method getInput(String) When I did I had :- private String getInput (String String) { return null; } If I return c1 instead of null, it will accept the String, but won't print. Will just continue accepting Help me jare. . . Am stuck cc : fulaman198, teempakguy (oya, Java is here ), dhtml18 & other guru programmers 1 Like |
Re: How Long Did It Take You Guys To Become Strong Java Programmers by ChinenyeN(m): 7:23am On Jan 07, 2016 |
Honestly, I'm still trying to wrap my mind around Java (I'm going the self-taught route). It's been almost a month now since I started learning, and so far, I've come to understand the logic behind frameworks and packages. I've also come to understand classes and inheritance in Java, but it's taking me longer than I imagined it would to really get a handle on the language. So far, the best I've done, in my self-taught journey is to build a simple package to test out/learn some OOP principles. I would like to get better with Java though. Overall, I'd say I've made some decent progress in the span of a few weeks of actual learning. Java has a ridiculously steep learning curve. C is so easy compared to this. Anyway, I imagine it would take me more time to become a strong Java programmer, but I believe I can at least get past the learning curve within the next coming months and probably get a good foundation in 3 - 6 months, maybe sooner if I prioritize. I project that I would be strong by the end of the year. It's not to say that I will claim to know the language inside-out, but I will at least be strong enough to know how to use Java to get things done. 1 Like |
Re: How Long Did It Take You Guys To Become Strong Java Programmers by ChinenyeN(m): 7:36am On Jan 07, 2016 |
Dekatron, I think the simplest way would be to just create a new Scanner object. Scanner in = new Scanner(System.in); System.out.print("Enter a color: " ); String c1 = in.nextLine(); System.out.println("You entered: " + c1); This is using java.util.Scanner; class |
Re: How Long Did It Take You Guys To Become Strong Java Programmers by omoelu1(m): 7:54am On Jan 07, 2016 |
what woukd you define as "strong" java programmer |
Re: How Long Did It Take You Guys To Become Strong Java Programmers by Fulaman198(m): 8:07am On Jan 07, 2016 |
Dekatron: You have to import a whole new class all together. import java.util.Scanner and then create a Scanner object, it's a long process, but it's explained here: http://www.programmingsimplified.com/java/source-code/java-program-take-input-from-user |
Re: How Long Did It Take You Guys To Become Strong Java Programmers by Fulaman198(m): 8:12am On Jan 07, 2016 |
ChinenyeN: Java is not a language that you can just learn in a month sadly. It's one of the more difficult languages and thanks to the fact that various APIs exist, otherwise it would even be more difficult to learn. It takes time, from what I have seen, if you programme in Java for a year, you should be decent at it, but by no means an expert. So I understand exactly what you mean by that my brother. It's definitely not an easy process. I think you will do fine, I'll keep at it too myself. My goal is to pass the OCA and OCP Java Oracle exams sometime this year (aiming for November). Java is so important because it is what it is used to create Android apps. I would also like to use it to build my own smart house eventually lol. 1 Like |
Re: How Long Did It Take You Guys To Become Strong Java Programmers by Intelligentdude(m): 2:33pm On Jan 07, 2016 |
Fulaman198:Tres bien |
Re: How Long Did It Take You Guys To Become Strong Java Programmers by Nobody: 9:24pm On Jan 07, 2016 |
**just here to troll** 2 Likes |
Re: How Long Did It Take You Guys To Become Strong Java Programmers by danidee10(m): 10:56pm On Jan 07, 2016 |
As a language Java is very big and broad and it takes years....yes years to master it and become proficient in it.....If you've started the journey of java....stick to it and continue your learning process....once you've gotten the basic syntax and can stick different pieces of codes to do something then think of a simple small and fun project that when you think of it in your head you know you can implement it but it's quite tough create it on github and give it your best shot try to follow best practices in java and you're building this project....keep on reading advanced books and apply the knowledge you learn from there to your projects (You can have multiple projects that focus on areas you want to learn, not just one)...that's when you'll find yourself moving from a beginner to intermediate level, at this stage you'll begin to see the reason why you should learn more about algorithms and the best way of doing things in Java....ALGO's are very important Also go on stackoverflow and see if you can answer questions (That's another good way of learning)....if you can answer a question then you're certainly not a beginner again, they're also many interactive learning sites (thought i don't personally know any for java) To be a good programmer in general do things like a progammer study how they behave, have a github account, ask and answer questions on stackoverflow and always practice and practice and Remember than Rome wasn't built in a day and always be humble don't ever feel like you're on bad guy or an experienced coder (when you get there your work and people will speak for you) Ride on bro 5 Likes |
Re: How Long Did It Take You Guys To Become Strong Java Programmers by Raypawer(m): 11:23pm On Jan 07, 2016 |
Good abi strong.. |
Re: How Long Did It Take You Guys To Become Strong Java Programmers by Fulaman198(m): 6:13am On Jan 08, 2016 |
danidee10: Excellent post. |
Re: How Long Did It Take You Guys To Become Strong Java Programmers by Fulaman198(m): 6:13am On Jan 08, 2016 |
crotonite: As usual right |
Re: How Long Did It Take You Guys To Become Strong Java Programmers by Dekatron(m): 9:50pm On Jan 09, 2016 |
Hi, fulaman198 and others that did answer finally, I got it. . . Since the day asked, the chance to program in java came today (am that busy recently) But I need another answer please :- I want to set a condition that when I enter a string (red in the case of this specific program), it would terminate if it fufills the condition & proceed if not. . . . I understand I have to use if statement (I knew that since I started learning programming- from FORTRAN to C++, which I dumped). . . But I did assign the if statement. . . My problem is :- I want to set a condition for a STRING nt an int. Hence, I cannot use operators like =,+,> . . . How then do I assign conditions in IF statement without using operators as its not a mathematical condition. Please help. I wll upload a screenshot (dont mind my task bar o, I un-pin the programs to reduce battery consuption, when not on charging mode. Hence, my empty and boring task bar. lol) 1 Like |
Re: How Long Did It Take You Guys To Become Strong Java Programmers by Fulaman198(m): 9:53pm On Jan 09, 2016 |
Dekatron: it will be something like if StringVariable.equals(String here) { //enter code segment here } else { // Enter more code here } 1 Like |
Re: How Long Did It Take You Guys To Become Strong Java Programmers by Fulaman198(m): 10:02pm On Jan 09, 2016 |
One thing you have to remember my friend Dekatron is that unlike other primitives (int, long, short, byte, double, etc.) String is not a primitive but an object. Thus, with objects if you want to verify if something is equal you have to use the equal() method. e.g. if myString.equals( "Nice job Sam!" ) { System.out.Println("Your String is " + myString); } else { // code goes here System.out.Println("Your string is interesting" ); } 1 Like |
Re: How Long Did It Take You Guys To Become Strong Java Programmers by omoelu1(m): 11:34pm On Jan 09, 2016 |
and in addition to what Fulaman198 said above, if you want your program to terminate if the condition is fufilled, do something like this:
|
Re: How Long Did It Take You Guys To Become Strong Java Programmers by Fulaman198(m): 12:18am On Jan 10, 2016 |
omoelu1: Very good, I had no idea there was a code html tag here ROFLLLL. where did you see that? |
Re: How Long Did It Take You Guys To Become Strong Java Programmers by Nobody: 9:51am On Jan 10, 2016 |
Java is one hell of a language. I'v been learning the language for the past 4months now and i think its not been easy at all. Java syntaxes are unforgiving. Its gonna take years hardwork for one to become fluent in that language. The secret is: learn the syntax, build ur own logic. I love the GUI features alot. Thats the area i wanna dwell on for now. 1 Like |
Re: How Long Did It Take You Guys To Become Strong Java Programmers by Fulaman198(m): 11:30pm On Jan 10, 2016 |
Omagzee: Definitely, Java is a very difficult high-level language like C++. I don't think one can call themselves an expert in the language unless if they have programmed in it for 3 years straight at the minimum. I'm thinking that if I take the Oracle OCA and OCJP and pass them convincingly, I will be more comfortable in my ability to programme in the language. Java is becoming more and more mainstream, many embedded devices in smart homes are using it now. My goal is that I want to be able to programme all appliances in a house. Call me a nerd, I don't care. But yeah, the code will have to be secure as well. I don't want anything getting hacked. That would be horrible . I think that Java may eventually overtake C++, but I know some naysayers who will disagree. 1 Like |
Re: How Long Did It Take You Guys To Become Strong Java Programmers by Nobody: 11:06am On Jan 11, 2016 |
ok, i just started learning java few months ago. i am all on my own though, no friends that are interested in programming, no mentor, no one single programming in my hood. but i think i am on the right path. pls guys help me verify these (inncomplete exercise) codes of mine:
arrrrgh...what a wanton code i have maanged to put togther. 1 Like |
Re: How Long Did It Take You Guys To Become Strong Java Programmers by kachnov(m): 12:19pm On Jan 12, 2016 |
If you are very good with java,why not help teach millions of Nigerian java enthusiasts online while making some income while at it. See signature. |
Re: How Long Did It Take You Guys To Become Strong Java Programmers by khaynoni(m): 8:33am On Jan 15, 2016 |
crotonite: A shorter solution but with a different programming language.
Python |
Re: How Long Did It Take You Guys To Become Strong Java Programmers by sinequanon: 12:59pm On Jan 15, 2016 |
Fulaman198: Not always true. In the code above, I think that it could be OK to use a simple ==. |
Re: How Long Did It Take You Guys To Become Strong Java Programmers by sinequanon: 1:10pm On Jan 15, 2016 |
I think that it would take at least a couple of years for a natural programmer to become proficient at Java. I don't think that it is achievable just through book learning and courses. Many of the concepts relate to working in a team. For example, concepts like "visibility" in OOP (Object Oriented Programming) are more clearly demonstrated when working in a team. This is also the case for error handling (exception handling) and so forth. Once you have experience the problems that arise from poor coding technique, either by yourself, or by having to fix somebody else's code, the real meaning and importance of these concepts become apparent, and they stick in your memory! 1 Like |
Re: How Long Did It Take You Guys To Become Strong Java Programmers by Fulaman198(m): 4:05pm On Jan 15, 2016 |
sinequanon: It does not work that way |
Re: How Long Did It Take You Guys To Become Strong Java Programmers by sinequanon: 4:25pm On Jan 15, 2016 |
Fulaman198: Sorry dude, you are wrong. Pay careful attention. I am saying that it depends on the details. In the scenario given, it depends where myString comes from. |
Re: How Long Did It Take You Guys To Become Strong Java Programmers by Fulaman198(m): 4:55pm On Jan 15, 2016 |
sinequanon: Kindly give an example. In Java, String is an object and not a primitive. If I'm wrong, prove it with some sample code. Thanks! |
Re: How Long Did It Take You Guys To Become Strong Java Programmers by sinequanon: 5:04pm On Jan 15, 2016 |
Fulaman198: Fair enough. What I am saying is that the following will output, "Strings ARE equal!" It is useful to do it this way in SOME cases. If you don't know which cases, and why it works in this case, stick to .equals() class KindExample{ |
Re: How Long Did It Take You Guys To Become Strong Java Programmers by Fulaman198(m): 5:23pm On Jan 15, 2016 |
sinequanon: The '==' operator tests for object references whereas .equals() tests the string values. E.g.
So that particular example you gave would work however, if you tried this:
myString1 is referencing to string in string pool and myString2 is referencing to string in the heap. That's why in regards to Strings, though your example works, if I'm checking for the content in the string, I'll use .equals(). If I'm checking for object equality, I'll use == 1 Like |
Re: How Long Did It Take You Guys To Become Strong Java Programmers by sinequanon: 5:39pm On Jan 15, 2016 |
Fulaman198: I said it works in some situations. You queried this. You were wrong. Your explanation is not quite right, either. In my example, string1 and string2 are two separate objects. |
Re: How Long Did It Take You Guys To Become Strong Java Programmers by ChinenyeN(m): 5:59pm On Jan 15, 2016 |
Maybe it's just me, but it seems as though both of you just ended up saying/explaining the same thing in the end. |
Discover How To Be A Blockchain Developer & Blockchain Engineer / Php Challenge: External Authentication Of Phpbb3 / Programmers how much do you earn monthly?
(Go Up)
Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health religion celebs tv-movies music-radio literature webmasters programming techmarket Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10) Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 99 |