More Java Stuff

Posted by chaimoosh on November 15, 2018

So as I progress in my learning Java I’m seeing how it’s less and less like Ruby. For starters you have to identify what any variable will be before you declare it which makes making variables much more tedious. For example if you want something to be an integer you have to write int myVariable= 4 rather than just declaring myVariable = 4 like you would in Javascript and if you decide do make that variable into some other data type it will give you this nasty looking error. Anotyher weird thing is that strings are not primitive data types in Java so if you want to create a string you have to make a new instance of the String class and intialize it so you can’t just declare a variable as a string.