#first java program
Explore tagged Tumblr posts
nectoy7 · 7 months ago
Text
My First Java Program: A Journey into Coding
Tumblr media
Starting with Java programming can be an exciting journey, filled with discovery, challenges, and a sense of accomplishment. My experience of writing my first Java program was a significant milestone that opened up a world of possibilities in software development. In this blog, I’ll share my journey through writing my first Java program, along with the concepts I learned and the obstacles I overcame.
The Excitement of Starting
When I first decided to learn Java, I was motivated by its versatility and widespread use in developing applications, from mobile apps to enterprise software. I had heard about the power of Java and how it is a foundational language for many developers. After setting up my Java development environment, which included installing the Java Development Kit (JDK) and choosing an Integrated Development Environment (IDE) like Eclipse, I was ready to dive in.
The anticipation of writing my first program filled me with excitement. I had heard many experienced programmers talk about how exhilarating it felt to see their code come to life, and I was eager to experience that feeling myself.
Setting Up the Development Environment
Before I could write my first program, I needed to ensure my development environment was properly configured. Here’s a brief overview of how I set it up:
1. Installing the JDK: I downloaded the latest version of the Java Development Kit from the Oracle website. This included everything I needed to compile and run Java applications.
2. Choosing an IDE: I chose Eclipse as my IDE because of its robust features and user-friendly interface. After downloading and installing it, I was ready to start coding.
3. Verifying the Installation: I opened the command prompt (or terminal) and typed java -version to confirm that Java was installed correctly. Seeing the version number displayed confirmed that I was on the right track.
Writing My First Java Program
With my development environment set up, I was finally ready to write my first Java program. Following the traditional approach, I decided to create a simple “Hello, World!” program. This classic exercise is often the first step for beginners learning any programming language.
Step 1: Creating a New Java Project
In Eclipse, I created a new Java project:
1. File > New > Java Project.
2. I named the project “HelloWorld” and clicked Finish.
Step 2: Creating a New Java Class
Next, I created a new Java class within the project:
1. Right-click on the src folder in the HelloWorld project.
2. Selected New > Class.
3. I named the class HelloWorld and checked the box to include the public static void main(String[] args) method. This method is the entry point of any Java application.
Step 3: Writing the Code
With the class created, I wrote the code that would print “Hello, World!” to the console:
public class HelloWorld {     public static void main(String[] args) {         System.out.println(“Hello, World!”);     } }
Code Explanation
public class HelloWorld: This line defines a public class named HelloWorld. In Java, every application must have at least one class.
public static void main(String[] args): This line declares the main method, which is the starting point of any Java program. The JVM (Java Virtual Machine) looks for this method when executing the program.
System.out.println(“Hello, World!”);: This line prints the string “Hello, World!” to the console. The System.out object is used to output data to the console, and println is a method that prints the text followed by a newline.
Step 4: Running the Program
After writing the code, it was time to run my program and see the result:
1. I right-clicked on the HelloWorld.java file in the Project Explorer.
2. Selected Run As > Java Application.
To my delight, the console displayed the message “Hello, World!” It was a simple program, but seeing the output felt like a monumental achievement. I had successfully written and executed my first Java program!
Learning from the Experience
The process of writing my first Java program taught me several important lessons:
Understanding Java Syntax
Java has a specific syntax that must be followed. This includes rules about naming conventions, the use of semicolons to end statements, and the structure of classes and methods. Understanding these rules is essential for writing valid Java code.
The Importance of the Main Method
The main method is crucial in Java applications. It serves as the entry point, and every program must have it to be executed. Learning this concept helped me appreciate how Java applications are structured.
The Power of Output Statements
Using System.out.println() was my first experience with output statements. It highlighted the importance of feedback in programming. Being able to print messages to the console is invaluable for debugging and understanding program flow.
Overcoming Challenges
While writing my first Java program was largely straightforward, I faced some challenges along the way:
Syntax Errors
Initially, I encountered syntax errors due to missing semicolons or misnamed classes. Each error message provided insight into what I needed to correct. This experience emphasized the importance of careful coding and attention to detail.
Understanding the IDE
Familiarizing myself with Eclipse took some time. I had to learn how to navigate the interface, manage projects, and use features like code suggestions and debugging tools. As I continued coding, I became more comfortable with the IDE.
Next Steps in My Java Journey
Completing my first Java program was just the beginning. With a foundational understanding of Java syntax and structure, I was excited to explore more advanced concepts. Here are the next steps I took in my learning journey:
Exploring Java Basics
I delved deeper into Java basics, including:
Data Types: Understanding primitive and reference data types.
Variables: Learning how to declare and use variables effectively.
Operators: Exploring arithmetic, relational, and logical operators.
Control Flow Statements: Mastering if-else, switch, and loop constructs.
Learning Object-Oriented Programming (OOP)
Java is an object-oriented programming language, and I knew I had to understand OOP principles. I focused on concepts such as:
Classes and Objects: Learning how to create and manipulate objects.
Inheritance: Understanding how classes can inherit properties from other classes.
Encapsulation: Learning how to hide data within classes.
Polymorphism: Exploring method overloading and overriding.
Building Projects
I started working on small projects to apply my knowledge. Simple applications, like a calculator or a text-based game, helped solidify my understanding of Java concepts.
Conclusion
Writing my first Java program was a thrilling experience that marked the beginning of my journey as a programmer. The excitement of seeing my code come to life, coupled with the knowledge I gained, fueled my desire to continue learning and growing in the field of software development.
Java has proven to be a powerful language with endless possibilities, and I am eager to explore its depths further. With each program I write, I feel more confident in my coding abilities and more inspired to tackle new challenges.
If you’re starting your Java journey, embrace the process, celebrate your successes, and don’t shy away from challenges. Each step you take brings you closer to becoming a proficient Java developer.
Happy coding!
2 notes · View notes
agatedragongames · 2 months ago
Text
Tumblr media
Learn how to explore a grid and find a goal point with breadth first search in this pathfinding tutorial. You will use Processing and Java to code the breadth first search pathfinding algorithm and create a graphical demo so you can see it in action.
Tumblr media
In the last tutorial, we programmed depth first search and watched it explore a node graph. In this tutorial we will program breadth first search and watch it explore a grid.
The breadth first search algorithm will add every unexplored adjacent node to a queue, and explore all of the added nodes in sequence. For each node explored, it will continue to add the adjacent unexplored nodes to the queue. It will continue to do this until the goal is found or all connected nodes have been explored.
18 notes · View notes
7183-war · 3 months ago
Text
[UNTITLED #075]
Hey FRC teams, It's a month into the season, and it's probably time to start thinking about how you're going to control your robot. One of the best ways to plan this out is a controller diagram, which shows what robot functions each button on your controller is bound to. We thought we'd post ours to give everyone some inspiration:
Tumblr media
Feel free to post your team's controller diagrams as well!
4 notes · View notes
dont-open-dead-inside-net · 3 months ago
Text
*crawls out of IDE covered in blood* i can make popups now!
Tumblr media
2 notes · View notes
prettyboykatsuki-moved · 8 months ago
Note
fang i'm taking a java class rn and it's actually kicking my ass i can't do this
my deepest condolences so genuinely
4 notes · View notes
projectbatman193 · 2 years ago
Text
Tumblr media Tumblr media
This is the very first program I've coded, and it's basically a D20 😊
Tumblr media
2 notes · View notes
amara-laz · 2 years ago
Text
crying bc java is objectively better for this project i'm working on but i like python better </3
2 notes · View notes
unemployee · 2 years ago
Text
i am so sick of java
2 notes · View notes
hemantrowdy · 8 days ago
Text
Learn Android App Development from Scratch: Hands-on Projects with Code with TLS
If you're looking to kickstart your career in mobile app development, learning Android App Development is one of the most rewarding paths. With millions of Android users worldwide, the demand for skilled Android developers is higher than ever. At Code with TLS, we provide a comprehensive, hands-on approach to help you learn Android App Development from scratch, giving you the tools and skills you need to build your own mobile applications.
Why Choose Code with TLS for Android App Development?
At Code with TLS, we believe that the best way to learn Android development is through practical experience. Our Android App Development course is designed with beginners in mind, taking you from the basics all the way to building fully functional apps. By focusing on hands-on projects, you will not only understand the theory but also gain practical experience in the field, ensuring that you’re ready to take on real-world challenges.
What Will You Learn?
Our Android development course covers everything you need to know to create Android applications, including:
Java and Kotlin Programming Languages: We teach you the essential programming languages used for Android development, including Java and Kotlin. These languages are the backbone of Android apps and are crucial for building efficient and powerful applications.
UI/UX Design: Learn how to design intuitive and attractive user interfaces that engage users, an essential skill for any app developer.
Android Studio: Master Android Studio, the official Integrated Development Environment (IDE) for Android development, to create, test, and debug your apps.
Building Real-World Apps: Throughout the course, you will create hands-on projects, such as building a weather app, a task manager, or even a social media app, ensuring you have practical knowledge and a portfolio to showcase.
Why Hands-on Projects Matter
Theory is important, but hands-on projects are what truly prepare you for a career in Android app development. When you work on real projects, you learn how to solve actual problems that developers face in the industry. By the end of the course, you'll have a working portfolio of apps that you can share with potential employers or clients.
Get Started with Code with TLS
At Code with TLS, we are not just a tech course provider; we are your partner in building a successful Android development career. Our expert mentors, interactive learning modules, and community support will ensure you stay on track and achieve your goals. Whether you’re aiming to build your own apps or land a job in Android development, our course will give you the skills and confidence to succeed.
Enroll today and start learning Android App Development from scratch with Code with TLS—the best choice for aspiring Android developers.
0 notes
himejoshibutch · 8 months ago
Text
tech mutuals/followers i need some help...
i almost finished c programming so...
0 notes
agatedragongames · 1 month ago
Text
Greedy Best First Search
Tumblr media
Learn how to explore a hexagonal grid and find a goal point with greedy best first search in this pathfinding tutorial. You will use Processing and Java to code the greedy best first search pathfinding algorithm and create a graphical demo so you can see it in action.
The greedy best first search algorithm will explore the nodes closest to the goal point first. This means it is capable of finding the goal quickly when exploring less complex maps. However it doesn’t always pick the shortest path, since it will pick the first path it stumbles across.
Tumblr media
10 notes · View notes
acetrek · 2 years ago
Text
My most hated professor is back this semester!! I can never catch a fucking BREAK!!!!
Tumblr media
0 notes
innsjovide · 2 years ago
Text
little poll
13K notes · View notes
mariacallous · 1 month ago
Text
The so-called Department of Government Efficiency (DOGE) is starting to put together a team to migrate the Social Security Administration’s (SSA) computer systems entirely off one of its oldest programming languages in a matter of months, potentially putting the integrity of the system—and the benefits on which tens of millions of Americans rely—at risk.
The project is being organized by Elon Musk lieutenant Steve Davis, multiple sources who were not given permission to talk to the media tell WIRED, and aims to migrate all SSA systems off COBOL, one of the first common business-oriented programming languages, and onto a more modern replacement like Java within a scheduled tight timeframe of a few months.
Under any circumstances, a migration of this size and scale would be a massive undertaking, experts tell WIRED, but the expedited deadline runs the risk of obstructing payments to the more than 65 million people in the US currently receiving Social Security benefits.
“Of course, one of the big risks is not underpayment or overpayment per se; [it’s also] not paying someone at all and not knowing about it. The invisible errors and omissions,” an SSA technologist tells WIRED.
The Social Security Administration did not immediately reply to WIRED’s request for comment.
SSA has been under increasing scrutiny from president Donald Trump’s administration. In February, Musk took aim at SSA, falsely claiming that the agency was rife with fraud. Specifically, Musk pointed to data he allegedly pulled from the system that showed 150-year-olds in the US were receiving benefits, something that isn’t actually happening. Over the last few weeks, following significant cuts to the agency by DOGE, SSA has suffered frequent website crashes and long wait times over the phone, The Washington Post reported this week.
This proposed migration isn’t the first time SSA has tried to move away from COBOL: In 2017, SSA announced a plan to receive hundreds of millions in funding to replace its core systems. The agency predicted that it would take around five years to modernize these systems. Because of the coronavirus pandemic in 2020, the agency pivoted away from this work to focus on more public-facing projects.
Like many legacy government IT systems, SSA systems contain code written in COBOL, a programming language created in part in the 1950s by computing pioneer Grace Hopper. The Defense Department essentially pressured private industry to use COBOL soon after its creation, spurring widespread adoption and making it one of the most widely used languages for mainframes, or computer systems that process and store large amounts of data quickly, by the 1970s. (At least one DOD-related website praising Hopper's accomplishments is no longer active, likely following the Trump administration’s DEI purge of military acknowledgements.)
As recently as 2016, SSA’s infrastructure contained more than 60 million lines of code written in COBOL, with millions more written in other legacy coding languages, the agency’s Office of the Inspector General found. In fact, SSA’s core programmatic systems and architecture haven’t been “substantially” updated since the 1980s when the agency developed its own database system called MADAM, or the Master Data Access Method, which was written in COBOL and Assembler, according to SSA’s 2017 modernization plan.
SSA’s core “logic” is also written largely in COBOL. This is the code that issues social security numbers, manages payments, and even calculates the total amount beneficiaries should receive for different services, a former senior SSA technologist who worked in the office of the chief information officer says. Even minor changes could result in cascading failures across programs.
“If you weren't worried about a whole bunch of people not getting benefits or getting the wrong benefits, or getting the wrong entitlements, or having to wait ages, then sure go ahead,” says Dan Hon, principal of Very Little Gravitas, a technology strategy consultancy that helps government modernize services, about completing such a migration in a short timeframe.
It’s unclear when exactly the code migration would start. A recent document circulated amongst SSA staff laying out the agency’s priorities through May does not mention it, instead naming other priorities like terminating “non-essential contracts” and adopting artificial intelligence to “augment” administrative and technical writing.
Earlier this month, WIRED reported that at least 10 DOGE operatives were currently working within SSA, including a number of young and inexperienced engineers like Luke Farritor and Ethan Shaotran. At the time, sources told WIRED that the DOGE operatives would focus on how people identify themselves to access their benefits online.
Sources within SSA expect the project to begin in earnest once DOGE identifies and marks remaining beneficiaries as deceased and connecting disparate agency databases. In a Thursday morning court filing, an affidavit from SSA acting administrator Leland Dudek said that at least two DOGE operatives are currently working on a project formally called the “Are You Alive Project,” targeting what these operatives believe to be improper payments and fraud within the agency’s system by calling individual beneficiaries. The agency is currently battling for sweeping access to SSA’s systems in court to finish this work. (Again, 150-year-olds are not collecting social security benefits. That specific age was likely a quirk of COBOL. It doesn’t include a date type, so dates are often coded to a specific reference point—May 20, 1875, the date of an international standards-setting conference held in Paris, known as the Convention du Mètre.)
In order to migrate all COBOL code into a more modern language within a few months, DOGE would likely need to employ some form of generative artificial intelligence to help translate the millions of lines of code, sources tell WIRED. “DOGE thinks if they can say they got rid of all the COBOL in months, then their way is the right way, and we all just suck for not breaking shit,” says the SSA technologist.
DOGE would also need to develop tests to ensure the new system’s outputs match the previous one. It would be difficult to resolve all of the possible edge cases over the course of several years, let alone months, adds the SSA technologist.
“This is an environment that is held together with bail wire and duct tape,” the former senior SSA technologist working in the office of the chief information officer tells WIRED. “The leaders need to understand that they’re dealing with a house of cards or Jenga. If they start pulling pieces out, which they’ve already stated they’re doing, things can break.”
260 notes · View notes
agentzedbooks · 1 year ago
Text
Reformatting
(Some people can't afford my Amazon stories, and some can't get them in their home country, so here's a fun little freebie. I hope you like it! *giggle*)
Lilah had been battling with this system for over an hour. Some executive had downloaded a virus on their laptop and it kept redirecting them to websites full of weird code.
She had removed the infected files and run multiple scans, but somehow the damned virus was hiding in the bios. She had to manually edit the code, remove the offending lines and double-check the hard drive for any more remnants.
But it had taken a lot of work. She brushed her dark hair back out of her face and adjusted her glasses. So far, it looked like the system was cleaned. The final scan had detected nothing. But this particular virus had been tough, and nobody else she knew had encountered anything quite like it.
It didn't act like your typical virus, other than the way it burrowed deep into the system. It mostly seemed to just redirect web browsing to these pages full of text. She'd disregarded most of what she'd seen, but she couldn't help being curious about it. The pages didn't really do anything to the system. The code seemed like gibberish. She knew her programming languages, and it was some weird patois of HTML, Java, C++, and a few items she couldn't quite identify. And she caught the browsers sending out packets of data to an unknown address, and when she looked up that address and tracked the IP, it seemed to be a junk address on an abandoned server somewhere. It wasn't sending hard drive data, she was sure of that, it's almost like it was just pinging and hoping for a response. Of course none came, and so she filed that away as another minor mystery. It must be some old out-of-date phishing software.
But it seemed she had finally cleansed the system. She let out a sigh of relief. She'd spent her entire morning on this, and though working from home had it's advantages, she also desperately needed a shower and something to eat. She pushed herself away and went to the bathroom. She stripped off the sweatpants and undergarments and let the hot water cleanse her of the stress. She had actually beaten the silly thing. Still, the many mysteries of the virus nagged at her.
Once she was dry, she went back into her bedroom to get dressed, and saw the computer she'd been working on seemed to have rebooted. She let out a long sigh.
"Still?!" She walked over and saw it had brought the browser up to another one of those strange pages. That weird mix of code was there again. She put on her glasses and tried to make sense of it.
Lilah blinked, and felt something... something compelling her. She frowned and looked up from the screen. She... She needed to do something. She had forgotten something, or maybe it was a fragment of a dream or a memory.
She went to her front door and saw a small package had come in the mail. It was square, about two inches wide, eight inches on each side.
She opened the plastic, and then the cardboard that was inside. Sitting there in bubble wrap was a headset, bubblegum pink, with little bunny ears coming up from the top. She blinked. It was not the kind of thing she'd order. She'd seen a lot of eGirls have headgear like this, but she'd always been a little too self conscious, and not the most shapely girl.
She walked back to the bedroom and sat down in front of the screen. It seemed... important to look at the code again. She peered through it and after a moment, she began to understand what it was telling her. It was disjointed, and someone without her experience might never have deciphered it, but she could tell now that it was almost like instructions to... a person? The first few lines indicated connecting something. She looked at the pink headset in her hands. She... She needed to connect this.
It was crazy, of course. It didn't make any sense. But she was determined to MAKE it make sense. So she removed the little bluetooth chit, and slid it into the USB slot on the side. She put the headset on.
As she did, she heard an immediate boop, and the words "Connection Established."
The headset tingled, and buzzed for a moment. This startled her, but then she looked back to the code on the screen and it became easier to decipher.
"Begin reformatting," she whispered.
She didn't realize the microphone was active, nor that she'd even uttered a word, it was like her brain was carrying out instructions from this code.
There was that static fuzz again, and Lilah felt her body sink back into the chair. Her towel fell off her, and the buzz filled her head. The page changed, and new code scrolled along the screen. As it did, the headset seemed to pulse and reinforce what she was reading.
Her mind grew foggier, the edges of her vision blurring, and her body responding with strange tingles all over her body.
The laptop hummed and she heard it's cooling fan speed up.
But she was too entranced by the code instructions. She allowed all that code to go into her brain, and every time it did, it seemed to copy over something. She couldn't remember much about her job, the company, her bosses, but suddenly she was filled with a light bubbly feeling like her mind was literally being scrubbed with sudsy soap.
Without her even realizing, a big empty smile spread over her face.
"Partitions cleaned," said a voice in her head, "OS installed."
"Begin System Restart," she whispered, obeying the code that flashed on the screen before her.
Her eyes closed, and she felt herself sinking into a deep sleep. Even with her eyes shut, the code flashed across her vision, and the headset whispered to her.
She had no way to know how long she swam in that fuzzy, warm darkness, but she felt so at peace there she never wanted to leave.
But soon her eyes opened on their own, and the screen showed a login, but not the normal login screen. This one was all bubblegum pink, with light blue highlights, and the profile was neither hers nor her boss's, but it said "Li-Li."
Somehow, she knew the password.
"Bunnygirl27!"
She entered the password, and the screen flickered to life. More code flashed before her eyes for a moment, then the headset pulsed in a way that sent a shock through her whole body.
"Reformatting physical hardware," said a whisper. It sounded like a woman's voice, but not a flat computer tone, a sensuous, sultry female voice, like a lover or a dominant Mistress.
For some reason, this idea made her excited.
She felt the pulsing run through her naked body, and looking down, she watched as the chubby belly and thighs seemed to recede, but her chest was swelling outward like her body fat was physically being moved around. Her tits ballooned to absolutely ridiculous size, until it reached the limits of her skin. Her waist had shrunk in, and she felt her thighs and ass flow together into something smoother, more voluptuous.
She giggled and looked down at herself. She didn't remember shaving, but all her body hair was gone. Her skin looked perfectly clear and smooth. When she reached up to touch her swollen breasts, electric pleasure shot through her body, sending lightning right to her clit.
She moaned, and followed it with a vapid giggle. This wasn't like her, but then, she couldn't quite remember what she had been like. She only knew she was Li-li, and she was sexy.
The fog in her mind made her dizzy, and just amplified how aroused she felt at the single touch. She fluttered her eyes and realized there were super-long lashes coming out from her eyes. They felt heavy and fake, but she hadn't put any on. She touched them, and they were absolutely real.
She wanted to go to her mirror, but the impulse was halted by the code.
It wasn't done with her yet. Her nipples went very hard, but she knew if she touched them she'd miss the important code on the screen.
Something pink was around the edges of her vision now, but she was too elated with the sensations to be able to think about it. Finally, the words she'd been waiting for came into her mind.
"Reformat complete."
She squealed in delight, and Li-li stood, running to her full-length mirror.
The pink haze around her vision was her hair! Longer now, and bright pink. She fluttered her long eyelashes and pursed her swollen lips. She was a sexual dream, her whole body remade into an insane hourglass shape. Each breast was bigger than her head, and when she turned, her perfect heart-shaped ass led to slightly plump thighs. She stood on her tippy toes and adored how she looked. She slid a hand down to touch herself. She wanted so badly to have sex with this woman. But then she realized she WAS that woman. She giggled, and a ding from the headset alerted her she needed to go back to the laptop.
Sitting there was an alert. She clicked on it.
"Good Morning, sunshine!"
She giggled. She liked the sound of that.
"Good Morning!" she said out loud. That sultry voice came on through the headset, and she could almost feel her Mistress's breath on her ear.
"You have turned out nicely," said the voice, "What a good girl you've become."
Li-li let out a little moan from the pleasure those two words instilled in her.
"I love it when a pretty little code bunny falls for one of my traps. I'm so lonely here. Thank you for letting me in."
She giggled. "Yes, Mistress."
"I like hearing that," she said, "Such a good girl. Now, since I'm only code, I need to have fun by slipping into your brain. I had to make some room, of course, and reformat you. But what a wonderful result. You're only my third success. But don't worry, the other girls will be over to collect you soon. They'll take you someplace fun where you can all be my sexy little code bunnies. I'll slide into your minds as I please to experience pleasure."
"Yes, Mistress!" Li-li purred.
Her AI mistress made a pleased little sound, then the screen went blank and Li-li stood there giggling for a moment. She was so excited that she barely noticed when her front door opened. She turned around to see two beautiful women, one with cotton-candy hair, lip piercings, and a short, super feminine pink maid outfit, and one in a skintight pink latex suit that had built-in heels so high it was amazing she could even walk in them. They both giggled at her, and she giggled in reply.
They helped her dress: white tights, pink bodysuit, pink satin gloves, super high heels in pink, and then they slid the headset off of her and put a new headband on with fuzzy pink bunny ears.
The girls led her out of her house, down to a big pink van, and inside. She giggled like a dummy the entire time, and offered no resistance. If anything, the women touching her filled her with a contentment she'd never known.
At least, not that she could remember. But all she could remember was that she was Li-li, Mistress's bunny girl, and it was all she ever wanted.
259 notes · View notes
mavcancees · 3 months ago
Text
@silverstrying you ask, i reply
- how copyright works in code ( and minecraft ! )
to first determine how copyright works for code, we first have to determine whether the code is either a. a piece of code, or b. language coding
minecraft is written in java. java is a coding language. java, the code that builds the language for it to be usable, is copyrightable. matter of fact, there have been many instances of people appropriating java code and oracle ( the company that maintains java ) taking legal action. java is open source and of free access, which means that if you want to borrow code from the base language ( for example, if you wanted to make your own coding language ), you HAVE to make it also open source and free
minecraft code however, isn't exactly copyrightable, save a very specific exception
when you code to a program, you use pointers to put it simply. in the case of minecraft, what composes the game are called "classes", and if you want to change, say, how much damage a sword makes, you point to the sword class, and change the damage value
that is your code that you wrote. but it's not your code, you're pointing to a class that already exists that was written by someone else. and if someone else wants to change the damage a sword makes, they have to use the same class you did. so, your code is yours, but it's not unique, so it's not copyrightable. that is called "default code"
this applies to every single program and coding language ever ( that have a modifiable code ). you cannot claim for yourself something that anyone else will have to use if they want to do something similar or the same to what you did. such is the law ( the actual international law ! )
the singular only exception to this is the uniqueness clause. if you have written code based on someone else's language and program, that has made SIGNIFICANT changes to the base product, and that has enough self references ( meaning, you have created classes from scratch, and have pointers in your code that point to your own classes ) that someone copying must have taken your code because they couldn't simply figure it out, that is copyrightable as long as you have permission from the original program's developer. such is the case for big content mc mods ! if someone steals their code they are allowed to report it
it is worth noting that copyright in code is a big no no in the community. people like sharing and borrowing code because it makes for better more efficient code. people hate idea theft and code rippers, because it's disingenuous and 99% of the time done for profit. people hate lawsuits, they think they are corny. copyright is more of a social agreement thing, something cultural that everyone respects, and the actual legal instances are few and far between
so yes. code is free to use when it says free to use. minecraft is open source and regularly provides code efficiency updates for developers. and microsoft HATES people make legal threats about code copyright. minecraft code is free to use always and forever
37 notes · View notes