Skip to content

YuriiJavaDev/JavaBasics_Task_13

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

User Profile Creation (JavaBasics_Task_13)

📌 Description

This project demonstrates string concatenation in Java. It shows how to combine multiple object types (String) into a single output using the + operator.

🚀 Task Requirements

As per the assignment instructions:

  1. Create two String variables: firstName ("Luke") and lastName ("Skywalker").
  2. Combine them into one string with a space in between.
  3. Display the full name on the screen.

📋 Expected Output

After running the program, the console should display:

Luke Skywalker

🛠 Technical Stack

  • Language: Java 23
  • IDE: IntelliJ IDEA
  • Concepts: String concatenation, Object types, Variable initialization.

⌨️ Practical Implementation

The project highlights that strings in Java are immutable. When we use the + operator, Java creates a completely new string object in the String Pool (or Heap) to store the combined result.

💻 Code Example

package com.yurii.pavlenko;

public class Task_13_App {
    public static void main(String[] args) {
        // Initializing object types (Strings)
        String firstName = "Luke";
        String lastName = "Skywalker";

        // Concatenating strings with a space in between
        String fullName = firstName + " " + lastName;

        // Outputting the result
        System.out.println(fullName);
    }
}

⚖️ License

This project is licensed under the MIT License.

Copyright (c) 2026 Yurii Pavlenko

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files...

License: MIT

About

This is a learning project. JavaBasics_Task_13 Implementing string concatenation when creating a user profile. 160126_1127

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages