₦airaland Forum

Welcome, Guest: RegisterLoginWith GoogleTrendingRecentNew

Stats: 3,325,120 members, 8,420,467 topics. Date: Thursday, 04 June 2026 at 08:42 PM

Toggle theme

HealerC's Posts

Nairaland ForumHealerC's ProfileHealerC's Posts

1 (of 1 pages)

Foreign AffairsRe: Police Discover Drugs In Bag Labelled 'Definitely Not A Bag Full Of Drugs' by HealerC: 6:42am On Oct 13, 2024
Definitely not grin
ProgrammingRe: Pro JS Devs, Please Is This Variable Chaining by HealerC: 3:07pm On Jul 02, 2022
Do you mean optional chaining?
ProgrammingRe: Please Help Out by HealerC: 10:55am On Feb 11, 2019
amt in the constructor is only in the scope of the constructor
Instead do
this.amt = amt;
in the constructor to assign the value of amt in the constructor to the global variable amt (the one outside). I still see other issues though but fix this one and see if you can figure the rest out.
EducationRe: 2018/2019 UNIBEN Admission Guide Thread. by HealerC: 7:14pm On Nov 09, 2018
.
ProgrammingRe: I Am Having Error With This Code Incompatible Type Error(SOLVE) by HealerC:
cool
Car TalkRe: Nissan Leaf All-Electric Vehicle Spotted In Lagos by HealerC: 8:11pm On Dec 07, 2017
Cool cool
but
Y is it dusty nawhuh
ProgrammingRe: Help! Where Did I Go Wrong? by HealerC(op): 7:58pm On Dec 07, 2017
asalimpo:
download
1. javadoc. it's a zip file
2. winrar - for opening zip files
3. notepad++ - for coding initially until you know what's going on under the hood
4. emacs,vim - for knowing what a long lived text editor is like. Never used them though,
but people who have say they're revolutionary.
Try them,they have a learnng curve.
5. some ides - i dont use ides . but for some coders they're the ish.
6. all the ebooks you can get on the programming language your are targeting.
7. A generator/inverter/solar: you 'll need constant power.
8. 3 years - be patient, you wont really know what is going on until 3 years + of heavy work.
Just keep doing it.
9. A mentor - some1 who's been there,done that. If you can't find one, pay the time cost.
like i said 3 years of constant coding and learning b4 u enter stage 1 - white belt.
10. stubborness and willingless to fail a lot - when i started there was no stack overflow,
no nairaland nothing. Installing the java compiler and writing hello world took almost 6 hrs!!
but i eventually did it. If youd dont have that kind of persistence , just forget it.
Many people start out wanting to do programming but 10,stops them. They soon fall by the way side.
if your calculator gets spoilt can your write one,after a few years of learning programming?
10,is bulldog tenacity to get it solved or die trying. Can you go that long? debug a program all thru the night? 10 is everything.
cheesy Look at specs
pcguru1:
All you need is Java SE and you are good, intact once you pass the basic data types and OOP you can start, Android Development though React native would have been faster for you but its good to learn the Native first in case you wan build plugins for Cordova or React Native for future.
Thank you very much guys...... I really appreciate smiley
ProgrammingRe: Help! Where Did I Go Wrong? by HealerC(op): 9:55am On Dec 05, 2017
Why cant I post on some other sections on nairaland huh
ProgrammingRe: Help! Where Did I Go Wrong? by HealerC(op): 9:47am On Dec 05, 2017
pcguru1:
Java for Small Phones -> J2ME Don't bother no one does this anymore Android has taken over, I used to write in this during a Nokia Academy in CCHUB

Java for PC -> Swing, JavaFX , To be sincere JavaFX has more effects but I see Swing used more , but these days everyone uses Electron (Memory Hogger)

Java for Android -> Actually it uses Java to talk to it's API not that it runs Java, it's Unix under so Java is used to talk to the underlying API which is in C++ that's why Android game dev use C++ and write their own apps in NDK (no experience here )

They are referring to the Virtual Machine I think a more experienced Android Dev can comment on that, Here is what you should do, reading the whole book won't work once you covered the basic follow this approach of building an application that works, start with console applications, it can even be tools you need for yourself,

try a simple app that takes input from user and stores to a txt file, that will expose you to File API, using bytes to read contents and FileStream, gradually you will understand how to approach problems and code. caio
ProgrammingRe: Help! Where Did I Go Wrong? by HealerC(op): 9:47am On Dec 05, 2017
pcguru1:
Java for Small Phones -> J2ME Don't bother no one does this anymore Android has taken over, I used to write in this during a Nokia Academy in CCHUB

Java for PC -> Swing, JavaFX , To be sincere JavaFX has more effects but I see Swing used more , but these days everyone uses Electron (Memory Hogger)

Java for Android -> Actually it uses Java to talk to it's API not that it runs Java, it's Unix under so Java is used to talk to the underlying API which is in C++ that's why Android game dev use C++ and write their own apps in NDK (no experience here )

They are referring to the Virtual Machine I think a more experienced Android Dev can comment on that, Here is what you should do, reading the whole book won't work once you covered the basic follow this approach of building an application that works, start with console applications, it can even be tools you need for yourself,

try a simple app that takes input from user and stores to a txt file, that will expose you to File API, using bytes to read contents and FileStream, gradually you will understand how to approach problems and code. caio
Thanks (i havent reach these areas at all)
But at least I just wanna know that while learning java now, when I wamt to learn the language java for android, it isnt gonna be a completely new concept
PhonesRe: Who In Nairaland Receives That MTN Data Surprise Bonus? by HealerC: 1:26pm On Dec 03, 2017
avniel:
i was given also valid for 7days but unfortunately I cant use it cause it on my small phone and its a micro sim my big phone uses nano
A small phone uses micro huh
ProgrammingRe: Help! Where Did I Go Wrong? by HealerC(op): 1:11pm On Dec 03, 2017
Maybe its about time to close the thread angry
ProgrammingRe: Help! Where Did I Go Wrong? by HealerC(op): 1:10pm On Dec 03, 2017
asalimpo:
Just use what you have but for those who've gone before u , consider their advice.
Notepad for coding - No No.
You want my opinion- use a programmers text editor -first,learn to compile from the command line.
Then learn to set classpath and put jar files in them. Learn how to use javadocs.
After that, you can go use whatever ide u choose.

Y learn without an ide first? - to simply know how things work under the hood.
if you learn how things work under the hood,you'll be a stronger more knowledgeable coder.
It's like learnng basic arithmetics without a calculator-at first,y? It makes your brain stronger..
Hello Happy Sunday
Thanks for your input..... Notepad++ would be great for now then.
Perhaps u started developing when waptrick and java games were reigning then although they're a bit obsolete now. I'll learning Java (a bit), lets say when i finish learning it, java for small java phones, for pcs, java for android, are they different concepts? I ask this question because Android is (at least) one very useful application of java (although Java might'nt be Android's official language) and the book I'm reading said it's google's version of Java Android uses (google's version of java huh Is it very different)

And i think the book I'm reading is good enough. I went through some parts of the table of contents and saw Java docs at a later topic "subroutines".... The topic just after the topic I'm in ( i still dey chapter 3 oo bros grin)

And I'm not just trying it. I plan to be more serious in learning it just that there are things that are (a bit) more prioritized than learning programming right now.

Btw I think it's because variables of type string are objects unlike those of type int, that's why strings have more application (maybe)

Happy Sunday all

grin
ProgrammingRe: Help! Where Did I Go Wrong? by HealerC(op): 12:33pm On Dec 03, 2017
asalimpo:
When i was learning, home internet was 5 years away (when mtn and glo released their dongles).
It was all cyber cafe all the way. if you're stuck no quick dash to the net to solve ur problems.
No youtube then?
I think it all boils down to laziness. intellectual laziness. That's y programming is the only (or one of the few) professions where people cant bluff their way thru easily. You either can program or not. That's y there's scarcity of good coders. This generation of instant everything has made people lazy asses. pathetic
cry
ProgrammingRe: Help! Where Did I Go Wrong? by HealerC(op): 2:24pm On Dec 02, 2017
pcguru1:
exactly which makes it more annonying, these are question you can google and solve, I think dev of this gen have too much hand-holding, when i was learning programming Stack Overflow and Programming communities didn't exist.
cheesy bros I hail oo
ProgrammingRe: Help! Where Did I Go Wrong? by HealerC(op): 2:23pm On Dec 02, 2017
asalimpo:
You are using notepad for coding ... You remind me of me when i first started.
Your problems will multiply going that route.
Get an ide or a java programming text editor like notepad++.
Download the documentation for your language. It's essential.
It seems your arent learning in a structured disciplined manner but just trying things out - maybe using web snippets or youtube videos. Get a good book- and slug through it,that way you wont come here asking
redundant questions.
yeah... I saw someone discouraging the use of IDE when you're a beginner
but this problem in Google, i saw people proffering various solutions (including calculations). It's like there isn't inbuilt automatic methods to do it.
ProgrammingRe: Help! Where Did I Go Wrong? by HealerC(op):
pcguru1:
No but it will teach you how to read JavaDocs especially when you realize everything is an Object and there's a class that handles what you need. if you had read a book you would come across the things needed for what you are asking, parsing String as Int, because your question clearly shows you need to even understand Computer Data types first before even java
Yeah.... even that parse integer method (Integer.parseInt([typechar])) you guys gave me compiled well but when I executed it it gave NumberFormatException embarassed

Perhaps I will have to learn Javadocs.... thah na later sha.... I may soon pause learning java to concentrate on other things

Thanks for your input so far, twas an eye opener

grin
pcguru1:
Note: Methods i don't think function is the right word though
cry cry cry
ProgrammingRe: Help! Where Did I Go Wrong? by HealerC(op): 6:28am On Nov 30, 2017
pcguru1:
Dude seriously just stop and go and read a proper book, This is hand holding, do some research and stuff , WHat i said suffices already just go and read a book, it will save you all this question asking.
Thank you very much sir
But a book can't possibly contain ALL functions
ProgrammingRe: Help! Where Did I Go Wrong? by HealerC(op): 6:24am On Nov 30, 2017
pcguru1:
An integer is a decimal charat is for string , that would mean you convert int to String and use a char at and convert back to Int but that's an odd operation what's the purpose for ?
Any other function apart from charAt?
ProgrammingRe: Help! Where Did I Go Wrong? by HealerC(op): 5:57am On Nov 30, 2017
Supposing I want to make a basic cmd program that will solve number bases and convert them to base 10
ProgrammingRe: Help! Where Did I Go Wrong? by HealerC(op): 5:54am On Nov 30, 2017
pcguru1:
Thanks I realized I sent value of instead of parseInt
babawarunn:
As pcguru1 said. Go and read a good java book. I recommend Java How to program.

This is the solution you need if you want to go about it the way you have written your code.

System.out.println(Integer.parseInt(String.valueOf(g.charAt(m))) * (int) Math.pow(b, a));

g.chartAt(m) : returns char '1'

String.valueOf('1') : returns String "1"

Integer.parseInt("1"wink : returns integer 1

1 * 27 = 27.

There is no shortcut. Take time to read a good java book, you will avoid mistakes like this.
sunsyde:
use Integer.parseInt (g.charAt(m)) to cast from "1" to 1
pcguru1:
1 and '1' are not the same go and read data type , you can't question a bunch of smart researchers who built this ,because its what the world runs on, they'd prob have a smart reason for that.
pcguru1:
Ignore I said that
Thank you all so very much
But is there a way to just do it automatically like, for instance if u have a string "story" u can get charat index 1 using charAt1 to get t
so is there a way for instance integer 1234 to get just a particular integer let's say 3. WITH IT STILL BEING AN INTEGER. something like that, please
ProgrammingRe: Help! Where Did I Go Wrong? by HealerC(op): 7:44am On Nov 29, 2017
pcguru1:
ASCII when memory was scare and highest was 2 bytes so they thought of smart ways to hold data.
Why Didnt they just leave it as 1 angry
ProgrammingRe: Help! Where Did I Go Wrong? by HealerC(op): 7:41am On Nov 29, 2017
pcguru1:
Integer.valueof you also need to learn reading Java Docs and OOP too, working on enterprise systems mehn you will need to, and Java docs is anything but straight forward
Thank you so much, I'll try it.
Whats enterprise system¿
ProgrammingRe: Help! Where Did I Go Wrong? by HealerC(op): 7:19am On Nov 29, 2017
pcguru1:
Integer
https://docs.oracle.com/javase/7/docs/api/java/lang/Integer.html
Sorry to disturb you but I dont have much experience in reading documentations yet. embarassed

Could you point it to me, please? embarassed
ProgrammingRe: Help! Where Did I Go Wrong? by HealerC(op): 7:11am On Nov 29, 2017
pcguru1:
255 sorry not 256
Thank you very much bros
ProgrammingRe: Help! Where Did I Go Wrong? by HealerC(op): 7:10am On Nov 29, 2017
pcguru1:
So I hate being curious I was intrigued as to why you got 1323 so when you say Charat it fetched the index 0 which points to 1 however in this case '1' and the fact that you used Interger you forced char to be converted to decimal in which in the Ascii table that's a 49 and you multiplied that by 27 which gave you your result. You're lucky you didn't exceed 256 past the size of the char I don't think it would have been a result you'd be able to explain.
WTF lipsrsealed
ProgrammingRe: Help! Where Did I Go Wrong? by HealerC(op): 10:52pm On Nov 28, 2017
Or could you please give me an alternative in getting single integer values from integers without first converting to string and using charAt?
ProgrammingRe: Help! Where Did I Go Wrong? by HealerC(op): 10:50pm On Nov 28, 2017
pcguru1:
You are multiplying String with Integer why not cast to int before doing that, read a proper book
Thank you pcguru1 for your swift response. According to what I read, "you can assign char values to int variables". But neverthrless I did what u suggested. See huh The same thing

ProgrammingHelp! Where Did I Go Wrong? by HealerC(op): 6:38pm On Nov 28, 2017
I started learning java not quite long but now I am faced with this problem in the screenshot.
I don't know why it happens like this. Please someone should proffer a solution. Thanks.

1 (of 1 pages)