<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: zrm9901</title>
    <description>The latest articles on DEV Community by zrm9901 (@zrm9901).</description>
    <link>https://dev.to/zrm9901</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3415725%2Fe5a152fe-3907-44d1-a46b-716354d274d2.jpeg</url>
      <title>DEV Community: zrm9901</title>
      <link>https://dev.to/zrm9901</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/zrm9901"/>
    <language>en</language>
    <item>
      <title>Responsible Use of AI in Coding</title>
      <dc:creator>zrm9901</dc:creator>
      <pubDate>Wed, 06 Aug 2025 11:06:34 +0000</pubDate>
      <link>https://dev.to/zrm9901/responsible-use-of-ai-in-coding-5061</link>
      <guid>https://dev.to/zrm9901/responsible-use-of-ai-in-coding-5061</guid>
      <description>&lt;h1&gt;
  
  
  Intro
&lt;/h1&gt;

&lt;p&gt;Hey, I just wanted to write this real quick as a warning and suggestion on how to use AI with coding.&lt;br&gt;
Also whenever I'm referring to AI in thsi article, I am using it as a shorthand for Generative AI, the one that most people are familiar with.&lt;br&gt;
Feel free to comment on your opinion on this topic, Im interested to see what others think about this.&lt;/p&gt;

&lt;h1&gt;
  
  
  What is AI in coding
&lt;/h1&gt;

&lt;p&gt;There are three types of use cases for AI in coding&lt;/p&gt;

&lt;h2&gt;
  
  
  Vibe coding
&lt;/h2&gt;

&lt;p&gt;This is one of the most contreversial topic of discussion, its is the idea where you dont do any coding, you do "prompting" and guide an AI while it codes.&lt;br&gt;
Obviously this is a topic of debate with two sides&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;We should use all the tools we have to code&lt;/li&gt;
&lt;li&gt;This isnt coding, this is just editing.
In this article im not going to weigh in on either side, just give you the facts&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Debugging
&lt;/h2&gt;

&lt;p&gt;One great and useful feature of AI in coding is for debugging purposes. ChatGPT and others are great for spotting the one error in hundreds of lines of code.&lt;br&gt;
As far as I can tell this isnt that contraversial, its just widely accepted as a tool&lt;/p&gt;

&lt;h2&gt;
  
  
  Concepts and Learning
&lt;/h2&gt;

&lt;p&gt;The main reason I am where I am in Java and Lua is because I utilized ChatGPT for learning. It is great for bouncing ideas off and for learning what things do / new methods to do things. There is one but though, which brings me to the main point of this article.&lt;/p&gt;

&lt;h1&gt;
  
  
  Pitfalls of AI
&lt;/h1&gt;

&lt;p&gt;AI can be a great learning tool, if used correctly. If you just copy paste code from ChatGPT into your editor, unless you are reading and making an effort to understand it, you aren't learning &lt;strong&gt;anything&lt;/strong&gt;.&lt;br&gt;
This is also my main issue with vibe coding. You eventually become dependant on your AI of choice needing it to do coding problems. I myself have fallen prey to this. A couple of years ago, I started "coding" in python, and by that I mean I vibe coded with ChatGPT before that was a popular thing. And I have to say it was one of the most frustraiting times of my life. It would never be able to generate good code, and was just me trying to salvage an already broken code base while understanding none of it. ChatGPT and others also like to flat out lie. Its rare but I've had times where it refused to admit it was wrong. And thats a big problem, if you are trying to learn through ChatGPT, it producing false information can be detrimental if you dont know how to spot it.&lt;/p&gt;

&lt;h1&gt;
  
  
  The Problem Now
&lt;/h1&gt;

&lt;p&gt;The thing is, now, ChatGPT and competitors &lt;strong&gt;are&lt;/strong&gt; good enough to effectively vibe code. Thats the problem so many people fall victim to. Its so easy, especially with python to just have an AI generate code for you and then &lt;em&gt;decipher&lt;/em&gt;. It is a very easy habit to just go to ChatGPT and say &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Hey can you generate ___ for me?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;And just copy paste the output. And thats the topic of debate. I haven't gotten too much into it but like I said above its a question of "is prompting coding?"&lt;/p&gt;

&lt;h1&gt;
  
  
  The Answer
&lt;/h1&gt;

&lt;p&gt;Kind of. People have been using new tools for a while, and if you use it right AI can become a valuable tool for you to use, but thats all it should be, a tool. It should not become your main driver. Especially if you consider the fact that you are probably willing to use libraries from other people for convinience, and thats exectly what AI is, a library created by programmers to help people. Some people tend to think AI is &lt;em&gt;alive&lt;/em&gt; (by that I mean an entity) and while we dont fully understand it we did create it. Its best explained in &lt;a href="https://youtu.be/UZDiGooFs54?si=_92Uba5LgpOAiTVF" rel="noopener noreferrer"&gt;this video&lt;/a&gt;. All it is is tranformers quite literally doing their name and transforming information. &lt;/p&gt;

&lt;h1&gt;
  
  
  How to Effectively us AI
&lt;/h1&gt;

&lt;p&gt;Now in my philosiphy, I believe its okay to use AI for coding with a few stipulations. &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Never&lt;/strong&gt; have it generate code for you to directly plug into your programs&lt;/li&gt;
&lt;li&gt;Have it generate psuedocode instead&lt;/li&gt;
&lt;li&gt;Ask it questions, not commands&lt;/li&gt;
&lt;li&gt;Try and learn from it, not just mindlessly copy paste&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These are my base rules for a couple of reasons. One, it forces you to write things down, which is apparently proven to help your memory (what all my english teachers told me at least), makes you translate psuedocode yourself, so you are applying your base knowledge onto more advanced topics, and for the questions part, in my opinion ChatGPT is a more effective learning tool than others. Sure, &lt;a href="https://www.w3schools.com" rel="noopener noreferrer"&gt;W3Schools&lt;/a&gt; is an amazing reference (seriously, check it out),but ChatGPT can teach you tailored ideas for you. For example, I have it set up so that it knows exactly what coding software im using, my current favorite language, and what game engine im using. It can then give me specifics on how to use elements for my projects. For me, I really think actually putting your code into practice is the most effective way to learn.&lt;/p&gt;

&lt;h1&gt;
  
  
  What do I Use Instead?
&lt;/h1&gt;

&lt;p&gt;Start off on a project you are passionate about. You will learn less things from a boring project your heart isnt in and potentially get burnt out compared to a passion project. For a while, the thing that got me into coding was softbody sims (&lt;a href="https://www.youtube.com/watch?v=bXbtG8ypRoU" rel="noopener noreferrer"&gt;my implementation&lt;/a&gt; if your interested), and it got me a lot of practice with the intricant details of Java and Lua.&lt;/p&gt;

&lt;h1&gt;
  
  
  Moral of the Story
&lt;/h1&gt;

&lt;p&gt;If you are just copy and pasting stuff from AI, I would strongly reccomend against that, its the same logic as calculators. Your taught math without them so you can do it if needed, but calculators are convenience tools thats the way AI should be used. If you can't do do a basic project without AI's help (think simple data parsing), you may want to go back and relearn it.&lt;/p&gt;

&lt;h1&gt;
  
  
  Outro
&lt;/h1&gt;

&lt;p&gt;Anyways, thanks for reading, all of the statements in this article were my opinion, and I am not advocating for harrasment of people who use AI to vibe code, I am merely asking for a &lt;strong&gt;self&lt;/strong&gt; reflection. You do not have the responsibility of what others are doing. There is nothing wrong with vibe coding and I think its really cool that AI has come this far. Have a nice day :)&lt;/p&gt;

</description>
      <category>ai</category>
      <category>discuss</category>
      <category>programming</category>
    </item>
    <item>
      <title>Arrays Vs Lists</title>
      <dc:creator>zrm9901</dc:creator>
      <pubDate>Wed, 06 Aug 2025 03:37:14 +0000</pubDate>
      <link>https://dev.to/zrm9901/arrays-vs-lists-4kgo</link>
      <guid>https://dev.to/zrm9901/arrays-vs-lists-4kgo</guid>
      <description>&lt;h1&gt;
  
  
  When to and when not to use arrays vs lists
&lt;/h1&gt;

&lt;p&gt;Hey, I'm bored so i guess ill just write this thing.&lt;/p&gt;

&lt;p&gt;So if you've come from a language like Lua or i believe Python, maybe even c, you probably know a lot about arrays. but from the people I've taught, you might not know about Lists. Arrays are commonly used in other programming languages but in java they are a bit different. In java, you declare an array and at initialization you specify its size, and that size is its final size.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;String[] stringarray = new String[10]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That's it, your array is now forever 10 long.&lt;br&gt;
Arrays are okay, and very useful for fast indexed based searching, but if you need anything more flexible you may want to look at Lists or even HashMaps. &lt;/p&gt;
&lt;h1&gt;
  
  
  Arrays
&lt;/h1&gt;

&lt;p&gt;Arrays are technically an object, but in a very minimalistic way. They provide nothing but the length and what is at an index. They can also directly store primitives and are a decent amount faster than Lists if you use them right.&lt;/p&gt;
&lt;h1&gt;
  
  
  Lists
&lt;/h1&gt;

&lt;p&gt;Lists are basically upgraded arrays but with a bit more overhead. Lists are a lot more flexible and some types (ArrayLists which we'll get to later) can even expand and contract at will. The main caveat is they store primitives wrapper classes (Integer vs int, etc.) instead of the base primitive, this gives it slightly more overhead from boxing and unboxing primitives to wrappers. Also, Lists can store more than jsut primitives, you can have a list of classes or other objects.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ArrayList&amp;lt;Integer, Example&amp;gt; // where Example is a defined class
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h1&gt;
  
  
  Wrappers
&lt;/h1&gt;

&lt;p&gt;if you didn't see my post earlier today, wrappers are basically, like lists, an upgraded version of primitives, with more functionality but less efficiency. TLDR if you don't need the extra methods, use primitives&lt;/p&gt;

&lt;h1&gt;
  
  
  Use cases of arrays
&lt;/h1&gt;

&lt;p&gt;Ok, so arrays can be very efficient especially for multidimensional arrays&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;String[][] s = new String[] {
   {"hello", "test"},
   {"nested", "tables"}
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;this is where arrays shine. That and when you have an extremely static dataset.  for example in my latest project I used an array just because I knew there was a max bound so it was more efficient to use an array. Arrays have really efficient look ups with indexing. &lt;/p&gt;

&lt;h1&gt;
  
  
  Use cases of Lists
&lt;/h1&gt;

&lt;p&gt;Ok so this is going to be a lot longer than the arrays. There's this special type of list that gets used the most often across the most projects and that is the ArrayList. The most versatile tool in java in my opinion, this thing is a beast. It has the benefits of storing anything that comes from lists, and it has ironic ability to do the opposite of arrays and resize itself dynamically. This thing is a staple of my bigger projects and the reason I was able to get a project I had been working on for month in Lua done in days in Java. These things are mid performance, versatile godsends. They can be used in almost anything dynamic and even in semi-dynamic situations they aren't that costly for the benefits they give. The other type of list I've used is the linked list. These are really useful for dynamic insertions where you need a specific order. I was able to reliably iterate through it for a project i don't really remember but it was pretty useful.&lt;/p&gt;

&lt;h1&gt;
  
  
  When to use Lists Vs Arrays
&lt;/h1&gt;

&lt;p&gt;Basically when in doubt or when performance isn't stretched too thin to be a concern I would recommend using Lists. The only exception is multidimensional arrays, that's where it starts to get costly, especially in game dev where frames are called 60 fps and it accumulates. That's when arrays start being worth it. The key is with arrays, you want to get as close to the surface as you can otherwise it becomes debugging heck.&lt;/p&gt;

&lt;h1&gt;
  
  
  Bonus: HashMaps
&lt;/h1&gt;

&lt;p&gt;HashMaps are a great mix between Lists and arrays. They have efficient look up and are designed for key value pairs. if you need a quick look up table with a semi static dataset, use HashMaps.&lt;/p&gt;

&lt;h1&gt;
  
  
  Outro
&lt;/h1&gt;

&lt;p&gt;anyways, thanks for coming to my ted talk lol&lt;/p&gt;

</description>
      <category>programming</category>
      <category>java</category>
      <category>beginners</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Java Quickstart Guide</title>
      <dc:creator>zrm9901</dc:creator>
      <pubDate>Wed, 06 Aug 2025 00:57:31 +0000</pubDate>
      <link>https://dev.to/zrm9901/java-quickstart-guide-47nb</link>
      <guid>https://dev.to/zrm9901/java-quickstart-guide-47nb</guid>
      <description>&lt;h1&gt;
  
  
  Intro
&lt;/h1&gt;

&lt;p&gt;Hey, I'm Zach and I'm creating a curriculum for teaching Java, and this seems like a nice site to start on. &lt;/p&gt;

&lt;p&gt;For anyone starting out from this tutorial, I do want to say that this will be the basics for now, things you need to do basic tasks like statistics and data analysis, but I will have a game dev post relatively soon.&lt;/p&gt;

&lt;h4&gt;
  
  
  Requirements
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;A capable code editor and compiler&lt;/li&gt;
&lt;li&gt;The JDK (a runtime kit that makes compiling the code possible)&lt;/li&gt;
&lt;li&gt;Basic problem solving skills and a critical thinking mind&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You can run java code on some web based compilers but for the sake of this tutorial I'm going to assume you have VSCode.&lt;/p&gt;

&lt;h4&gt;
  
  
  Resources
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.w3schools.com/java/default.asp" rel="noopener noreferrer"&gt;W3 Schools&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://chatgpt.com/?model=auto" rel="noopener noreferrer"&gt;ChatGPT&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.youtube.com/@ThatOneGuyWhoIsAPerson" rel="noopener noreferrer"&gt;My Youtube (random projects)&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  What is OOP?
&lt;/h1&gt;

&lt;p&gt;Ok, so one key thing to know getting into Java is that it is an object oriented language. That means that you cant just have standalone functions, they need to be contained in an object. In java's case its classes. Basically, each class is a template, think of it like a cookie recipe, you have instructions to do something and out pops a cookie (a class instance). Now these instructions can have variations, think of those like instance variables. We will get into this more when we talk about classes, but basically, each object can hold variables and methods, and to access the variables and methods you have an object that you create to hold them.&lt;/p&gt;

&lt;h1&gt;
  
  
  Syntax
&lt;/h1&gt;

&lt;p&gt;So in java, you &lt;strong&gt;need&lt;/strong&gt; semicolons after every declaration. By that I mean every time you declare a variable, call a method, anything other than conditionals.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;String s = "hello world"; //correct
String s = "hello world" // no semicolon, will throw an error
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Java also is peculiar about statements. If you've come from lua or python you might be familiar with indentation defining scope and blocks, in Java its {}. the last relevant thing about syntax is conditionals go in parentheses. A simple project could look like this&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;if (true) {
   System.out.println("hello world");
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Notice how everything is nice and neat compared to indentation based languages. &lt;/p&gt;

&lt;h1&gt;
  
  
  Variables
&lt;/h1&gt;

&lt;p&gt;In java there are two types of variables, primitives and what I call 'wrappers'. primitives are the simple storage variables, things like 'int' , 'char', etc. and dont have any extra functionality. Wrappers are basically upgraded versions of primitives, with the drawback of being more costly.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;int i -&amp;gt; Integer i;
boolean b -&amp;gt; Boolean b;
double d -&amp;gt; Double d;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;and more. If you aren't familiar with the types of variables, a boolean stores a true or false value, and is used in conditionals. A string stores words, and ints -&amp;gt; floats -&amp;gt; doubles are numbers with more decimals as you get further down the chain. A key thing about Java is that it is statically typed. That means you &lt;strong&gt;have&lt;/strong&gt; to declare what type of var it is on its initialization, and it cannot be changed.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;s = "hello world"; // no way for the compiler for it to know its a string

int s = 1;
s = "hello world"; // you cannot change what type a var is

String s = "hello world"; // perfect
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Technically there is a 'var' type that inferences the type at initialization, but you still cannot change the type afterwords and in my opinion its safer to statically type so you can debug easier.&lt;/p&gt;

&lt;h1&gt;
  
  
  Comments
&lt;/h1&gt;

&lt;p&gt;Before I forget, because I forget to do this often, its good practice to use comments to annotate your work so you and others can go back later and know what you did, and how it works. I will try my best to comment my code so you know whats happening but no promises :)&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;//this is a single line comment

/* 
   this 
   is
   a
   multiline
   comment
*/
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;whenever you comment something out, it will effectively be ignored by the compiler so it is purely for convenience for later. I fall prey to forgetting to comment my code and it made it very hard to come back to an old project after a break.&lt;/p&gt;

&lt;h1&gt;
  
  
  Classes
&lt;/h1&gt;

&lt;p&gt;Now we are getting into the whole point of java. Classes are templates or blueprints for building an object. Each top level class needs to be defined in its own file but you can subclass (more on that later). You define a class with the "class" keyword&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;public class Main {
//your class code here
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;in that example notice I use the public modifier. There are levels of access that these modifiers give. If you make the class public anything can access it, if you make it private, only the corresponding file can access it. If you leave it blank anything in the same module can access it (more on that later). So I keep saying that each class is a template right? Here's what that means. Whenever you use a class you do something called instantiating it, which basically mean you are creating a local version of it and it becomes its own thing. You will never use raw classes, you will always use instances of it. Heres what creating an instance of it looks like.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;//Example.java
public class Example {
   String s = "hello world";
}

//Main.java

public class Main {
   public static void main(String[] args) {
      Example e = new Example();
   }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;So that was a lot of new things, all the stuff in Main.java is basically saying its the entry point for the compiler, without it the compiler wouldnt know wehre to start. I will get into all the modifiers for main in a second, but for now notice how I created an Example instance. You first use the class name as the type, you give the instance name, then new then the class name followed by parentheses. Each class has its own instance variables, so if i were to do&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Example a = new Example();
Example b = new Example();
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;each of those instances would have different references to the variables, that basically means you change one the other one is unaffected. Thats another point, in java, whenever you create a class, you are creating a reference to it in memory, so if you do something like this&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Example a = new Example();
Example b = a;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;if you changed something in b you are also changing something in a, so be careful of that when trying to copy things. A class has three parts, it has instance variables (variables that are specific to the instance), methods, and constructors. The most important one is the constructor. This is what makes you able to assign variables to classes. think of it as additional ingredients you add into your recipe, everyones going to do it differently. heres how they work&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;public class Example { // make a class like normal
   int i; // declare variables
   String s;
   public Example() { // you use the public modifier then the class name
     i = 10; // this is where you assign your variables
     s = "hello world";
   }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The real function of constructors is the fact that you can pass variables into it when creating a function&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;public Example(String s, int i) { // declare vars in the parentheses
   i = i; // assuming you already put int i; and String s; in the top of the class
   s = s; // not required but recommended for vars passed in and assigned to be the same name for clarity

}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The nice thing about constructors is they allow us to dynamically manage data. For example, you pass in a string to a constructor, you can use it wherever you need throughout the class. One drawback to this is you &lt;strong&gt;must&lt;/strong&gt; put in exactly what types the constructor is expecting. You can access the variables with the 'this' reference, which is basically pointing to the parent class' reference, basically whenever you want to operate on a classes variables you can access them with this.variable&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;System.out.println(this.varible); // assuming this.variable is a string
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;next I want to talk about methods. If you are coming from another language you can think of methods as functions bound to a class. each method &lt;strong&gt;has&lt;/strong&gt; to have an instance of the parent object to use it, unless you use the static modifier (more on this later). you declare method inside a class like this&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;class Example {
   public void test() {
      // your code 
   }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;heres a rundown on what needs to be there. The method has to have an access modifier (technically optional but good practice), a return type, and the method name. With the same logic of constructors, you can pass data into methods in the parentheses. Methods can also access the parent class unless you add the static modifier. The static modifier is made for methods that, like the name suggests, are mostly static. The benefit is without it you would have to create an instance of the parent class first&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Example.test(); /will fail

Example e = new Example();
e.test(); // normal call
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;but if you make it static just by adding the keyword static after the access modifier, it loses its parent class variables, but you can call it without making an instance&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Example.test(); //works because test is static
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Next lets move on to method overloading. This is a very useful mechanic for when you have code that you want to use different types on (think same logic for double and float). to do this you would declare the first method as normal, then just declare it again with a different type.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;public void test(int i) { // fist type

}

public float test(float f) { //you can even change return types

}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This may look a bit scuffed at first but it is extremely useful when you are dealing with multiple data types or want dynamic code.&lt;/p&gt;

&lt;h1&gt;
  
  
  Outro
&lt;/h1&gt;

&lt;p&gt;Thats about it for the first chunk of the lesson, stay tuned for arrays and lists, and if you see anything wrong in my work make sure to notify me so i can fix it. thanks for reading and good luck on your coding&lt;/p&gt;

</description>
      <category>java</category>
      <category>beginners</category>
      <category>programming</category>
      <category>tutorial</category>
    </item>
  </channel>
</rss>
