String Builder | Java Placement Course Lecture 13

Apna College
11 Oct 202124:31

Summary

TLDRThis video script discusses the intricacies of Java's StringBuilder class, emphasizing its efficiency over the traditional StringBuffer. The tutorial covers the need for StringBuilder due to the inefficiency of memory operations within StringBuffer, particularly when dealing with string modifications. It illustrates how StringBuilder reduces memory usage and processing time through direct memory manipulation, bypassing the need to create new strings. The script also provides practical examples, demonstrating how to use StringBuilder for tasks like string concatenation, character insertion, and deletion, all while optimizing performance in Java applications.

Takeaways

  • 😀 The video discusses the concept of 'String Builder' in Java, which is used to optimize operations involving string manipulation.
  • 👨‍🏫 The traditional approach of using 'String' in Java for operations like addition and deletion can be memory-intensive and time-consuming.
  • ⏰ The video explains that 'StringBuilder' is introduced to overcome the inefficiencies of the 'String' class, especially in scenarios where frequent modifications are needed.
  • 🛠️ 'StringBuilder' allows for mutable sequences of characters, which is more efficient in terms of performance and memory usage compared to immutable 'String' objects.
  • 🔍 The script highlights the technical details of how 'StringBuilder' handles operations internally, emphasizing its role in reducing the time complexity of string manipulations.
  • 💡 The video provides a practical demonstration of using 'StringBuilder' to create, modify, and delete strings, showcasing its utility in real-world programming scenarios.
  • 📝 The script includes a discussion on the limitations of Java's 'String' class, such as the inability to change the content of a string once it's created.
  • 🔧 The video script walks through the process of declaring and using 'StringBuilder', including how to append, insert, and delete characters within a string.
  • 📈 It emphasizes the importance of understanding the performance implications of using 'String' versus 'StringBuilder', particularly in large-scale or performance-critical applications.
  • 🎓 The educational content is aimed at enhancing the viewer's understanding of Java's handling of strings and the benefits of using 'StringBuilder' for optimized string operations.

Q & A

  • What is the main topic discussed in the video script?

    -The main topic discussed in the video script is about the 'String Builder' in Java, its usage, and how it can optimize operations involving strings within the Java framework.

  • Why is the String Builder class necessary according to the script?

    -The String Builder class is necessary because it helps in optimizing the time taken by operations that involve modifications such as add, delete, and modify within strings, which are computationally expensive in Java's standard string handling.

  • What problem does the String Builder class aim to solve?

    -The String Builder class aims to solve the problem of time-consuming operations on strings in Java, which can lead to poor user experience in applications due to increased processing time.

  • How does the String Builder class differ from normal string operations in Java?

    -The String Builder class differs from normal string operations in Java by allowing modifications without creating new string objects each time, thus reducing memory usage and improving performance.

  • What is the process of creating a new String in Java as described in the script?

    -The process of creating a new String in Java involves initializing a string with certain characters and then adding or modifying characters using operations like 'plus', 'append', and others, which may lead to increased memory usage and time consumption.

  • Why might using the standard string operations in Java lead to performance issues?

    -Using standard string operations in Java can lead to performance issues because each modification operation creates a new string object, which is stored in memory, leading to increased memory usage and slower execution times, especially in large-scale applications.

  • What is the significance of the 'modify' operation in the context of the String Builder class?

    -The 'modify' operation in the context of the String Builder class is significant because it allows for efficient changes to be made to the string without the overhead of creating new string objects, thus improving the overall performance of the application.

  • How does the script describe the memory management when using String Builder?

    -The script describes that using the String Builder helps in managing memory more efficiently by reducing the need to create new string objects for each modification, thus optimizing both memory usage and processing time.

  • What is the role of the 'append' method in the String Builder class as per the script?

    -The 'append' method in the String Builder class is used to add new characters or strings to the existing string without creating a new string object, which is more efficient than standard string concatenation in Java.

  • How does the script suggest optimizing string operations in Java applications?

    -The script suggests optimizing string operations in Java applications by using the String Builder class, which provides methods like 'append', 'insert', 'delete', and others that allow for modifications without the high time and memory costs associated with standard string operations.

  • What is the time complexity implication of using the String Builder class compared to standard strings?

    -The time complexity implication of using the String Builder class is that it reduces the time taken for string modifications, as opposed to standard strings in Java where each operation can lead to the creation of a new string object, thus increasing time complexity.

Outlines

00:00

💻 Introduction to String Building in Java

The paragraph introduces the concept of string building within Java, focusing on the inefficiencies of using '+=' operation in loops for string concatenation. It discusses how this can lead to the creation of multiple unnecessary string objects, impacting performance. The speaker then introduces the 'StringBuilder' class as an optimized alternative, which allows for mutable sequence modifications without the overhead of creating new string objects. The explanation includes a basic example of how strings are manipulated in Java, the memory implications, and the benefits of using 'StringBuilder' over string concatenation in performance-critical applications.

05:04

🔧 Deep Dive into StringBuilder Operations

This section provides a deeper exploration of the 'StringBuilder' class, illustrating how it can be used to efficiently manipulate strings. The speaker discusses the class's methods, such as 'append', 'insert', and 'delete', with examples demonstrating how these operations are performed. The paragraph emphasizes the reduced memory footprint and improved performance when using 'StringBuilder' for string manipulations, especially within loops. It also touches on the concept of immutability in Java with regards to strings and how 'StringBuilder' allows for mutable string operations without the need to create new string objects.

10:06

🎯 Practical Examples of StringBuilder

The speaker presents practical examples to demonstrate the use of 'StringBuilder' in various scenarios, such as inserting characters at specific indices and deleting substrings. The paragraph walks through the process of using 'StringBuilder' methods like 'setCharAt' for replacing characters and 'delete' for removing parts of the string. It also covers how to retrieve characters using 'charAt' and discusses the implications of these operations on the overall performance and memory usage of Java applications.

15:09

🔁 Reversing Strings with StringBuilder

This part of the script focuses on the practical application of 'StringBuilder' to reverse strings. The speaker explains the logic behind reversing a string using a loop that swaps characters from the beginning and end of the string until the middle is reached. The explanation includes a step-by-step guide on how to implement this in code, emphasizing the efficiency gains over other methods of string reversal. The paragraph also touches on the importance of understanding the logic behind array manipulation for solving such problems programmatically.

20:09

📚 Conclusion and Future Lessons

The final paragraph summarizes the key learnings from the session on 'StringBuilder' and its applications. It highlights the importance of understanding the class and its methods for optimizing string manipulation in Java. The speaker also provides a sneak peek into future lessons, which will cover more advanced topics and problem-solving strategies using 'StringBuilder'. The paragraph concludes with an assurance that the audience will gain a comprehensive understanding of Java basics and be well-equipped to tackle more complex programming challenges.

Mindmap

Keywords

💡StringBuilder

StringBuilder is a class in Java that is used to manipulate strings in an efficient way. It is designed to be mutable, unlike the String class, which is immutable. This means that StringBuilder can be modified after it has been created, and it does so without creating a new string object each time, which is more memory efficient. In the video, StringBuilder is mentioned as a solution to optimize string operations within the Java environment, especially when dealing with modifications like adding or deleting characters within a string.

💡Memory

Memory, in the context of the video, refers to the computer's RAM where data is stored temporarily for quick access by the processor. The video discusses how operations on strings can affect memory usage, particularly when using immutable objects like String in Java. For instance, when a string is modified, a new string object is created in memory, which can be inefficient. StringBuilder is introduced as a way to perform string manipulations with less memory overhead because it allows modifications without creating new objects.

💡Optimization

Optimization in the video refers to the process of improving the efficiency of a program or algorithm. This is especially important when dealing with string manipulation in Java, as the default string operations can be costly in terms of time and memory. The video discusses how using StringBuilder instead of the standard String operations can lead to more optimized code, reducing the time complexity and memory usage, which is crucial for large-scale applications.

💡String

String is a fundamental data type in Java used to represent sequences of characters. The video explains that strings in Java are immutable, meaning that once a string is created, it cannot be changed. Any operation that appears to modify a string actually creates a new string object. This immutability leads to inefficiencies when performing operations that involve frequent modifications to the string, which is why StringBuilder is recommended for such scenarios.

💡Class

In Java, a class is a blueprint for creating objects. It defines properties (fields) and methods (functions) that the object will have. The video mentions the creation of a 'StringBuilder' class, which is a specialized class designed to handle string manipulations efficiently. The concept of a class is central to object-oriented programming in Java and is used extensively throughout the video to explain how different operations can be performed on string objects.

💡Method

A method in Java is a block of code that performs a specific task and is associated with a class. The video discusses various methods related to the StringBuilder class, such as 'append()', 'insert()', and 'delete()'. These methods are used to manipulate the string without creating new string objects, showcasing how methods can be used to perform operations on objects in an efficient manner.

💡Index

Index in the context of the video refers to the position of a character within a string. String manipulation often involves accessing or modifying characters at specific positions, and indices are used to pinpoint these positions. The video explains how methods like 'insert()' and 'delete()' use indices to specify where in the string the operation should occur, which is a common practice in programming when dealing with arrays or collections of data.

💡Immutable

Immutable, as used in the video, describes the property of an object whose state cannot be modified after it has been created. In Java, strings are immutable, which means that any operation that changes the string actually results in the creation of a new string object. This is in contrast to mutable objects, like StringBuilder, which can be changed without creating a new object. The video highlights the importance of understanding immutability when optimizing string operations in Java.

💡Time Complexity

Time complexity in the video refers to the amount of time an algorithm takes to run as a function of the length of the input. The video discusses how certain string operations in Java can have high time complexity due to the immutability of strings, which leads to the creation of new string objects for each modification. By using StringBuilder, the time complexity of string manipulations can be reduced, making the operations faster and more efficient.

💡Delete

The term 'delete' in the video is used in the context of removing characters from a string. When using the StringBuilder class, the 'delete()' method is used to remove a range of characters specified by a starting index and an ending index. This operation is more efficient than trying to delete characters from an immutable String object, which would require creating a new string without the characters to be deleted.

💡Insert

Insert, as discussed in the video, refers to the operation of adding characters to a string at a specified index. The StringBuilder class provides an 'insert()' method that allows characters to be inserted at a particular position without the need to create a new string object. This is more efficient than concatenating strings in Java, especially when multiple insertions are needed, as it avoids the overhead of creating multiple intermediate string objects.

Highlights

Introduction to the video discussing the String Builder in Java.

Explanation of memory management issues with traditional string operations in Java.

The concept of 'StringBuilder' as a solution to inefficient memory handling.

Detailed discussion on how StringBuilder improves performance over traditional strings.

Technical explanation of the timing issues with string operations and how StringBuilder optimizes them.

Introduction to the 'StringBuffer' class and its synchronization features.

Practical demonstration of creating and using a StringBuilder in Java.

Explanation of immutability in Java strings and its implications.

Discussion on the memory storage of code and data in Java.

In-depth look at how strings are manipulated using StringBuilder for various operations.

Tutorial on appending characters to a string using StringBuilder.

Explanation of the memory changes that occur during string modifications.

The impact of large-scale string manipulation on program performance.

How StringBuilder reduces the time complexity compared to traditional string methods.

Practical example of inserting characters into a string using StringBuilder.

Demonstration of deleting characters from a string using StringBuilder.

Overview of the basic operations possible with StringBuilder.

Conclusion and summary of the key points covered in the video.

Transcripts

play00:00

हेलो हाय एव्रीवन वेलकम टो थे जॉब

play00:02

प्लेसमेंट को साथ की वीडियो में हम बात कर

play00:04

रहे होंगे इस ट्रिक बिल्डर के बारे में

play00:06

डांस क्लास में हमने पढ़ा स्प्रिंग्स के

play00:08

बारे में और स्ट्रेस हमने बात की थी इन द

play00:10

क्लास में कि स्प्रिंग्स जावा के अंदर इन

play00:13

उल्टी बंद होती है अथवा क्या मतलब है एक

play00:16

बार ज्यादा के अंदर आपने मेमोरी के अंदर

play00:18

कोई टीम बना दी फिर उसमें ना आप कुछ डिलीट

play00:21

कर सकते हैं या आप कुछ ऐड कर सकते हैं अगर

play00:24

कुछ भी डिलीट या वेट करना होगा तो हम एक

play00:26

नई स्प्रिंग बनानी पड़ेगी अब यह जो नई

play00:29

फिल्म बनाने का प्रोसेस होता है यह थोड़ा

play00:31

सा टाइमटेकिंग होता है जिसकी वजह से जब भी

play00:34

कोई कोड होता है ज्यादा के अंदर जिसमें

play00:35

स्ट्रिंग होती है और उसके ऊपर ऑपरेशन होते

play00:38

हैं ऐड के डिलीट के मॉडिफाई के तो उस केस

play00:41

में वह प्रोग्राम ज्यादा टाइम लेता है अब

play00:44

यह ज्यादा टाइम लेने वाली जब प्रॉब्लम ही

play00:46

इसी की वजह से हमें घुम और ऑप्टिमाइज्ड

play00:48

स्ट्रिंग की क्लास के जरूरत पड़ी और इस

play00:51

क्लास को हमने जॉब के अंदर नाम दिया

play00:53

स्ट्रींगबिल्डर स्ट्रिंग बिल्डर जो class

play00:55

है वह आरडीए सारे ऑपरेशन कर लेती है और

play00:58

उतना टाइम भी नहीं लेती है इसीलिए जब भी

play01:01

ऐसे मॉडिफाई करने वाले ऑपरेशन जाते हैं

play01:03

किसी रिकॉर्ड के अंदर ज्यादा में तो हम

play01:05

स्प्रिंग का यूज नहीं करते हम स्प्रिंग

play01:07

बिल्डर पर यूज करते हैं अब यह प्रॉब्लम

play01:09

क्यों आती है स्प्रिंग्स के अंदर उसके

play01:11

बारे में थोड़ा सा बात कर लेते हैं उसके

play01:13

बाद हम शुरुआत करेंगे क्लास की स्प्रिंग

play01:15

बिल्डर्स के साथ अब हमें आलरेडी पता है कि

play01:18

जावा के अंदर स्ट्रीम्स आफ रिन्यूएबल इसका

play01:20

मतलब अगर मैं मेरी मीटिंग बना दी तो उसको

play01:22

चेंज नहीं कर सकते उस को म्यूट ऐड नहीं कर

play01:25

सकते ऐसा इसलिए होता है क्योंकि जावा के

play01:28

दिन मेरी की बात करें तो दो तरीके से जो

play01:31

वैरियेबल्स होते हैं या जो भी कुछ डाटा

play01:33

होता है कोड का वह मेडिकल वेस्ट होता है

play01:35

या तो और डाटा जो है वह स्टोर होता है

play01:38

स्टॉक की फॉर्म में बीटेक के बारे में

play01:41

आपने ऑलरेडी पहली क्लास में बात क्यों है

play01:43

टॉर्क यानि जैसे ऑब्जेक्ट्स को एक के ऊपर

play01:45

एक प्लेट कर देते हैं वैसे ही यहां पर

play01:48

हमारा जो कोड है जो फंक्शंस है ज्यादा के

play01:50

वह भी एक के ऊपर एक्सट्रैक्टेड फ्रॉम

play01:52

प्लेस होते हैं तो कुछ जो कोड का पार्ट

play01:54

होता है वह स्ट्रैट की फॉर्म में मेमोरी

play01:56

के अंदर स्टोर होता है और कुछ कोड का पाठ

play02:00

रूप में सोर्स होता है तो यह हो गई है

play02:02

हमारी खेत में मिली थी

play02:05

मैं तो जब भी हम स्ट्रिप्स की बात करते

play02:08

हैं अगर मान लीजिए हमने स्टेटमेंट कि

play02:10

स्टेटमेंट कुछ इस तरीके से है कि स्ट्रिंग

play02:13

कि एसटीआर इज इक्वल टू इच अब इस केस में

play02:18

हमारे हित के अंदर एक स्ट्रिंग बनेगी

play02:22

जिसमें स्टार्ट करेंगे और हमारे स्टेप के

play02:26

अंदर बनेगा हमारा वेरिएबल एसटीआर और यह

play02:28

टेस्टी यार कुछ इस तरीके से स्प्रिंग बैच

play02:31

की तरफ पॉइंट कर रहा होगा अब स्ट्रेंज केस

play02:34

में अगर मान लीजिए हमें क्वेश्चसं को ऐड

play02:37

करके इसको पूरा हेलो बनाना है किस तरीके

play02:40

से बनाएंगे हम सबसे पहले लिखेंगे इस ट्रिक

play02:42

प्लस हमारा कैरेक्टर कि उसके बाद यह जो

play02:47

होगा यह बन जाएगा एचपी फिर लिखेंगे एसटीआर

play02:51

प्लस मेल यह बन जाएगा एचटीएमएल फिर

play02:55

लिखेंगे एसटीआर प्लस दोबारा सेल यह बन

play02:58

जाएगा आईटी एलएल फिर लिखेंगे एसटीआर प्लस

play03:02

ओम और अब यह बन जाएगा का यह हेलो कुछ इस

play03:05

तरीके से हम स्प्रिंग को मॉडिफाई

play03:07

करते-करते हेलो बना देंगे अब हर एक ऑपरेशन

play03:09

में मेमोरी में क्या होगा सबसे पहले अ है

play03:13

तो हमारा जो एक है

play03:15

वह Bigg Boss करता था मेरी के अंदर अब

play03:18

उसके बाद मेमोरी के अंदर दोबारा से टेस्टी

play03:20

बनेगा और अब हमारा जो पॉइंट है

play03:23

वह पहले की तरह पॉइंट करके अब इसे अच्छी

play03:27

तरह पॉइंट करेगा और यह मेमोरी से डिलीट हो

play03:29

जाएगा उसके बाद जब हमने ऐड किया तो दोबारा

play03:32

से मेमोरी के अंदर एचटीएमएल नाम के एक नई

play03:34

स्प्रिंग बनेगी और हमारा जो लिंग है वह

play03:38

पुराने को ना पॉइंट करके हम नए को अपॉइंट

play03:40

करेगा दोबारा से अमेरिका अंदर से डिलीट हो

play03:43

जाएगा उसके बाद फिर से हम एक नाइस पिक

play03:45

बनाएंगे एक बेल और हमारा जो पॉइंट है वह

play03:48

सीरियल की जगह इस फोर स्किन की तरफ पॉइंट

play03:52

करेगा और नई एक वाटरिंग बनेगी जो घी ऐड

play03:55

बेलो यानि हेलो और हमारा जो पॉइंट है वह

play03:59

यहां एसटीआर एचपीसीएल की जगह हमारी फाइनल

play04:03

स्ट्रिंग यानि हेलो किधर अपॉइंट करेगा और

play04:06

यह जो हमारी पुरानी स्प्रिंग होगी डिलीट

play04:08

होती रहेगी और नाइस प्रिंट बनी रहेगी

play04:10

मेमोरी के अंदर अब जब भी मेमोरी के अंदर

play04:12

ही पीएम क्विक क्रिएट होता है वह थोड़ा सा

play04:15

टाइम टेकन प्रोसेस होता है यह टाइम वैसे

play04:17

तो मिली सेकंड में लगता है माइक्रोसेकंड

play04:20

में लगता है लेकिन मान लीजिए कि आपने बड़ा

play04:22

सा प्रोग्राम लिखा है जिसमें अब फ्रेंड

play04:24

चैनल बहुत सारी चेंजेस कर रहे हैं तो उसके

play04:27

बाद यह जो कोड है यह जो प्रोग्राम है जो

play04:29

भी यूजर इस पर बैठा होगा तो यह टाइम

play04:31

मल्टीप्लाई होते-होते सेकंड का डिलीवरी

play04:33

देखा जो कि कभी भी अच्छी बात नहीं है तो

play04:36

आपका कोड जो भी आपके एप्लीकेशन पर बैठा

play04:38

होगा इस मंजर को बहुत वेट करना होगा जिसकी

play04:41

वजह से यूजर एक्सपीरियंस है वह बिगड़

play04:43

जाएगा क्योंकि इतना वेट कोई नहीं करना

play04:45

चाहता इसी वजह से फ्रेंड बिल्डर क्लास आई

play04:48

और स्प्रिंग बिल्डर की हेल्प से क्या होता

play04:50

है थोड़ा सा भी समझते हैं इसलिए बिल्डर की

play04:53

हेल्प से कुछ ऐसा होगा कि जब भी हम

play04:55

स्प्रिंग बिल्डर को बना देंगे माइलेज हमने

play04:57

यहां पर स्ट्रींगबिल्डर बनाया एसबी नाम का

play05:00

और हमने मेमोरी के अंदर एक बनाया अब जब भी

play05:04

मेमोरी के अंदर कोई चेंजेस करने होंगे मान

play05:06

लीजिए हमें एग्री करना होगा यहां पर तो इस

play05:09

तरीके से और होगा सबसे पहले याद होगा यह

play05:11

पीस की तरफ पॉइंट करें इस फिल्म मे लॉर्ड

play05:14

होगा फिर इसमें एक और लडूंगा फ्री में

play05:17

कौओं का इसके स्विंग बिल्डर के केस में

play05:20

वोट डाइरैक्टली वहीं पर पॉइंट करें यहां

play05:23

पर हमारा स्ट्रींगबिल्डर के ऑब्जेक्ट है

play05:25

यह हमारा एक सोर्स आफ फिर उसी के अंदर

play05:27

चेंजेस करते करते करते करते हुए इसका हेलो

play05:30

बना दिया और हमें नई फिल्म बिल्डर

play05:32

ऑब्जेक्ट की जरूरत नहीं पड़ेगी तो यह

play05:35

डिफरेंस होता है स्प्रिंग और

play05:36

स्ट्रींगबिल्डर में इसकी वजह से टाइम काफी

play05:38

सारे स्मज होता है और मेमोरी में थोड़ा

play05:40

चेंज जाते हैं थोड़ा और डिटेल में उसकी

play05:42

क्लास में पढेंगे कि कैसे एग ही के अंदर

play05:45

जो है ऑब्जेक्ट्स क्रिएट होती है और

play05:47

नॉर्मल बेवजह मारे स्टेप में क्रिएट होते

play05:49

तो ताकि ज्यादा चैनल चीज समझ में आएंगी पर

play05:52

अभी के लिए आए हो कि थोड़ा सा डिफरेंस

play05:54

हमें समझ में आ गया कि स्प्रिंग बिल्डर कि

play05:56

हमें जरूरत क्यों पड़ी अब बात करते हैं कि

play05:58

स्प्रिंग बिल्डर को यूज कैसे करते हैं

play06:00

ट्रेनिंग और स्पिन बोल्डक काफी सिमिलर है

play06:02

स्प्रिंग के जो बहुत सारे ऑपरेशन जगमोहन

play06:05

सिंह बिल्डर के अंदर भी कर सकते हैं तो

play06:07

इतना हमें कोई डिफरेंस महसूस नहीं होगा

play06:09

प्लास्टरिंग बिल्डर के अंदर अपने कुछ नया

play06:11

ऑपरेशन स्किन को मॉडिफाई कर है तो हमें

play06:14

काफी हेल्प करेंगे इस प्रोग्राम अब शुरुआत

play06:16

करते हैं इसलिए बिल्डर्स के साथ सबसे पहले

play06:18

देखेंगे कि स्ट्रींगबिल्डर कॉम डिक्लेअर

play06:20

कैसे करते हैं अब स्ट्रींगबिल्डर को

play06:22

डिक्लेयर करने के लिए सबसे पहले हम

play06:24

लिखेंगे क्लास का नाम विच डिस्टिक

play06:26

बिल्डर और देंगे बल का नाम इज इक्वल टू

play06:29

न्यू स्प्रिंग बिल्डर है

play06:33

है और यहां पर जो भी स्प्रिंग हमें पास

play06:35

करनी है वह क्लिक दिमागी हमने पास करना है

play06:37

टोनी

play06:39

तो इस तरीके से हमने एसबी नाम का एक

play06:42

स्प्रिंग बिल्डर बना लिया अब इसको सिंह

play06:44

भंडारी के इस क्लास के अंदर हम स्प्रिंग

play06:46

ही करेंगे कि एडविना कि हमने इस ट्रिक बना

play06:48

लिए जिसका टाइप हिस्ट्री बिल्डर अब एसबी

play06:52

को अगर हम प्रिंट करें तो इसकी वैल्यू को

play06:54

ऑब्जर्व करते हैं तो हमारे लिए प्रिंट हुआ

play06:57

है थोडा टेस्ट तो अब फिर से एक और चीज

play07:00

करते हैं अब इसमें क्या करेंगे हम एक

play07:02

कैरेक्टर निकालेंगे किसी भी इन ट्रैक्स पर

play07:05

स्टोन हम कैरेक्टर निकाल सकते थे

play07:06

स्प्रिंग्स के अंदर और वही जो फंक्शन है

play07:08

वह स्ट्रींगबिल्डर के अंदर भी काम करता है

play07:11

तो मान लीजिए कि हमें प्रिंट करवाना है

play07:14

कैरेक्टर

play07:15

टिंडे इससे रो तो कैरेक्टर वेस्टइंडीज को

play07:19

प्रिंट करने के लिए b.ca अर्थ यह फंक्शन

play07:23

हमने स्प्रिंग में भी बड़ा सा इसमें पास

play07:25

करें हमारा जो भी इंडेक्स चाहिए हमें में

play07:28

है और रन करेंगे इसको तो हमारे लिए प्रिंट

play07:31

होकर आएगा टीम तो टीम जो है वह जीरो

play07:34

इंडेक्स पर सपोर्ट था इस फिल्म के अंदर

play07:36

इसीलिए डिफरेंट हो गया है अब स्प्रिंग

play07:39

बिल्डर के अंदर एक और नया फंक्शन होता है

play07:41

इस फंक्शन का नाम है टेस्ट कैरेक्टर

play07:43

अटेंडेंस अभी तुम क्या कर रहे थे कि हम

play07:46

कैरेक्टर को देख रहे थे कि सेंटर्स पर कौन

play07:48

सा कैरेक्टर हमारी स्किन के अंदर है हम

play07:51

क्या कर सकते हैं उस इंडिकेशन जो भी

play07:53

करेक्टर है उसको हटा कर वहां पर कोई और

play07:55

कार्यक्रम डाल सकते हैं तो एक तरीके से

play07:57

महक के इंडेक्स पर सपोर्ट कैरेक्टर को ने

play08:00

सेट कर दिया अपनी मर्ज़ी से क्या करेंगे

play08:03

तो नहीं जो हमारी स्प्रिंग है इसके अंदर

play08:05

जरूरत इंडेक्स पर सेट कर देंगे इस चीज को

play08:08

रिप्लेस कर देंगे पी के साथ तो इसको करने

play08:12

के लिए हमारे पास जो फंक्शन है उसका नाम

play08:14

है चेक अप यौन और

play08:17

सेट कर के अंदर दो पैरामीटर हम पास करते

play08:21

हैं पहला होता है हमारा इंडेक्स दूसरा

play08:23

होता है जो भी कैरेक्टर में वहां पर सेट

play08:25

करना है तो इंडक्टर्स और सेट कर क्वाटर्स

play08:29

पे इसको भी सेव करते हैं और रन करते हैं

play08:32

अब यहां पर क्या हुआ यह प्रिंट स्टेटमेंट

play08:36

हटानी पड़ेगी क्योंकि इस से तो चेंजेस के

play08:39

अंदर प्रिंट करना है को

play08:43

करेंगे कोड को और अब हमारे लास्ट में

play08:48

रिप्लेस के

play08:54

साथ-साथ इसके अलावा

play08:57

में एक फंक्शन होता है इसको

play09:00

कर सकते हैं अगर हमारे पास कोई भी है कि

play09:04

अभी हमारे पास कोई है जिसका नाम है तो अब

play09:09

हम इस स्टोरी को

play09:11

मतलब हमें इसको सेलेक्ट करना है अपने अंदर

play09:16

कौन से इंटैक्ट पर

play09:18

मतलब पहले हमारे पर था

play09:22

3000 पर हम चाहते हैं ऐसा और बाकी की बारी

play09:26

की जो है वह हो क्वेश्चन तो इसको करने के

play09:30

लिए इनसाइड नाम का फंक्शन होता है इनसाइड

play09:33

नाम का फंक्शन हम कुछ इस तरीके से यूज

play09:35

करते हैं कि हम लिखेंगे एसबीआई डॉट इंसर्ट

play09:38

और इसके अंदर सबसे पहले का पास करेंगे वह

play09:41

इंडेक्स जहां पर हमें अपने कैरेक्टर को

play09:42

इंस्टॉल करना यानि जरूर एंड उसके बाद पास

play09:45

करेंगे अपना कैरेक्टर विच सैफ और आप क्या

play09:47

करेंगे अब अपनी स्प्रिंग को यानी सेबी को

play09:50

हम प्रिंट करवा देंगे तो अब हमारे लिए जो

play09:52

प्रिंट होकर आया है दैट ए स्टोर्मी तो

play09:54

हमारे जो है वह टीके आ गया मान लीजिए कि

play09:58

हमें इसकी जगह क्या करना होता है हम चाहते

play10:01

हैं कि टोनी जो है उसकी जगह हम लिख पाएं

play10:05

toom10 वाइड नो

play10:08

हैं तो इस Jio चिकन टो इंडक्ट है

play10:13

2012 से इंटैक्ट पर हम एक एंड इंसल्ट करना

play10:17

चाहते हैं तो उसको इंसल्ट करने के लिए

play10:19

हमने यहां पर लिखना पड़ेगा इंडेक्स नंबर

play10:22

टू और यहां पर लिखना पड़ेगा एंड उसके बाद

play10:25

अगर हम अपनी और इनको प्रिंट करवाएं तो यह

play10:29

ऐसा कुछ रिजल्ट हमारे पास आएगा जिसमें

play10:31

हमारे पास टोनी विंडसर डबल एंड प्रिंट हो

play10:33

जाएगा तो कुछ इस तरीके से हम अपनी

play10:35

स्प्रिंग बिल्डर में चीजों को इंसर्ट भी

play10:38

कर सकते हैं अब हमने देख लिया कि कैरेक्टर

play10:40

गेट कैसे करते हैं कैरेक्टर सेट कैसे करते

play10:43

हैं कि नई चीज कैसे इंसल्ट करते हैं अब

play10:45

बात करते हैं डिलीट की हम डिलीट भी कर

play10:47

सकते हैं इसलिए बिल्डर से जिस भी इंडेक्स

play10:50

से जिसमें स्टार्टिंग इंडेक्स लेकर एंड तक

play10:53

हमें अगर कोई पाठ डिलीट करना इसलिए के

play10:56

अंदर से तो उसको डिलीट करना पॉसिबल है अब

play10:58

हम क्या करेंगे डॉट डिलीट फंक्शन यूज

play11:00

करेंगे और उस डॉन डिलीट की हेल्प से हम

play11:03

अपने कैरेक्टर या फिर इस अब स्क्रीन को

play11:06

डिलीट कर सकते हैं कि कि कैसे करेंगे मान

play11:09

यह हमने जो एक्स्ट्रा एंड इंसल्ट किया था

play11:11

अपने कोर्ट से इसको हमें डिलीट करना है

play11:14

तुम डिलीट भी एक्स्ट्रा एंड इसको डिलीट

play11:17

करने के लिए हम लिखेंगे एस बी डी एट और

play11:20

स्टार्टिंग इंडेक्स सबसे पहले पास करेंगे

play11:22

स्टार्टिंग इंडेक्स हमारे लिए होगा तू

play11:24

क्योंकि डिलीट करना शुरू करना है और थर्ड

play11:29

इंटैक्ट जाना है अब यहां पर जो एंड

play11:31

इंडेक्स है वह नाइंथ क्लास है मतलब अगर

play11:34

हमने थ्री पास किया तो उठने लगा सिर्फ तू

play11:36

तक जाएगा अगर 45 के होता तो सिर्फ तक जाता

play11:39

तो कुछ इस तरीके से अगर हम ऋतु को मत फ्री

play11:41

लिखा है तो फिर वह टू काठमांडू तक ही

play11:44

जाएगा और टू काठमांडू मतलब हमारा सिर्फ एक

play11:47

कैरेक्टर यानि उसके बाद दोबारा से प्रिंट

play11:50

कर देंगे अपना स्ट्रींगबिल्डर विच एसबीआई

play11:52

जो तो हमारे लिए प्रिंट होकर आया व्हिच इज

play11:55

द ओरिजिनल प्रिंट ओनली तो पहले क्या था

play11:56

ओरिजिनल प्रिंट की टोनी उसमें एक डबल एंड

play11:59

हमारे पास आ गया फिर हमने उसको डिलीट कर

play12:01

दिया तो ओरिजिनल स्पेक्ट्रम वापस आ गए अब

play12:04

मान लीजिए कि हमें टोनी काट टॉय बनाना

play12:06

होता तो वह मैंने कि दोनों इन हमें हटाने

play12:09

होते तो उस केस में हम शुरू करते टू से और

play12:12

लेकर जाते श्री तक तो यहां पर इन इंग्लिश

play12:15

टर्म फॉर लिख देते हैं इसको सेव करके अगर

play12:18

रावण करें तो आउटपुट कुछ ऐसा होगा जिसमें

play12:21

पहले था टोनी फिर हमने डबल एन बना दिया और

play12:23

फिर दोनों एंड को हटाने के लिए हमने तुमको

play12:25

माफ और पास किया जिससे इंडेक्स नंबर टू और

play12:28

इंडेक्स नंबर थ्री वाले जो दोनों कैरेक्टर

play12:30

है वह हट गए हमारी स्पीड से तुलसी हमारे

play12:33

जो आपको डाउट एस टो मीट इसके अलावा हम

play12:36

अपनी जो स्ट्रींगबिल्डर है उसके अंदर

play12:37

चीजें अप एंड भी कर सकते है फ्रेंड मतलब

play12:40

उसके एंड में चीजें जोड़ देना अब जैसे

play12:43

हमने हेलो एग्जाम पर लिया था तो उस हेलो

play12:45

के एग्जांपल में देखते हैं क्या फाल अगर

play12:48

मामले थे स्प्रिंग बिल्डर हम बनाते इंच का

play12:51

तो सबसे के और पहले क्या करते हैं एसबी

play12:53

में पेंट करते फ्रंट करना मतलब लास्ट में

play12:55

जोड़ देना लास्ट में जोड़ते ही

play12:58

कि उसके बाद दोबारा से उसके लास्ट में हम

play13:02

जोड़ते मेल

play13:05

को दोबारा से पेंट करते हम एक ऑयल

play13:09

और फिर हम पेंट करते हो

play13:14

है अरे एंड में प्रिंट करवाते अपनी

play13:16

स्ट्रींगबिल्डर को अब इस कॉर्ड को रानी

play13:18

करके देखते हैं कि इसका आउटपुट क्या होगा

play13:20

तो आउटपुट आया हमारे पास हेलो तो ऐड से

play13:24

हमने पूरा हेलो बना दिया और यह जो एक कप

play13:26

एंड वाली स्टेटमेंट है इसमें मेमोरी में

play13:28

कोई चेंज नहीं हो रहा है अगर यह एंट्री

play13:30

सबस्ट्रिंग के लिए करते तो उसमें लिखते

play13:32

एसटीआर रिकार्डो एपीआर

play13:35

इस क्लास की कुछ इस तरीके की स्टेटमेंट

play13:39

होती यहां पर होता है एसटीआर रिक्वेस्ट ऊ

play13:41

एसएसटीआर प्लस इल

play13:44

कि इस केस में हर एक स्टेटमेंट में एक नई

play13:47

स्प्रिंग बन रही होती लेकिन अप एंड के केस

play13:49

में उससे टेंपरिंग बिल्डर में चेंजेस और

play13:52

हैं जिसकी वजह से टाइम कम लग रहा है

play13:54

ऑपरेशंस कम टाइम में पूरे और हैं और हमारा

play13:57

कोड ज्यादा फैशन है तो इस तरीके से अपन जो

play13:59

है काफी हेल्प करता है यूजर्स को अन

play14:01

प्रोग्राम इसको इसके बाद एक और फंक्शन एवं

play14:04

फ्रंट में यूज किया करते थे विनर्स डॉट

play14:06

लेंथ बेल्ट लेंथ फंक्शन यहां पर भी काम

play14:08

करता है अगर स्ट्रिंग जो है उसके हमें एंड

play14:11

में लेंथ प्रिंट करवानी होती तो उसके लिए

play14:14

डॉट लेंथ जैसे हम प्रिंट में यूज करते थे

play14:16

उसी तरीके से यूज करेंगे तो हमारे पास

play14:19

प्रिंट होकर आएगा पांच तो हेलो की जो लेंथ

play14:22

है डिटेल्स पांच तो हमारे लिए इस तरीके से

play14:25

हम लेंथ भी प्रिंट करवा सकते हैं इसलिए

play14:27

बिल्डर की अब हमने कुछ बेसिक ऑपरेशन से

play14:29

इसलिए स्ट्रींगबिल्डर के ऊपर अमित

play14:31

क्वेश्चन सॉल्व करके देखते हैं जोहरा

play14:32

स्टूडियो में एक स्टूडेंट ने कमेंट किया

play14:34

था उनको डाला 10 क्वेश्चन में क्वेश्चन का

play14:38

नाम है रिपोर्ट सत्संग रिवर्स स्विंग अपने

play14:41

आप में काफी बेसिक जो है समझ में आ रहा है

play14:43

कि क्या करना है हमें कि हमें भी होगी एक

play14:46

स्ट्रिंग स्ट्रिंग अंदर हमें क्या करना है

play14:48

उस पूरी की पूरी फ्रिल को रिवर्स करना है

play14:50

फॉर एग्जांपल अगर हम इस ट्रिक भी होती है

play14:52

हेलो तो हमारे पास जो आउटपुट आना चाहिए वह

play14:56

आना चाहिए वह ले लीजिए

play14:58

अगर हमें मान लीजिए स्ट्रिंग दी है तो उनी

play15:02

तो हमारे लिए जो आउटपुट आएगा डाट विल बी

play15:05

व्हाय एंड OTP अगर हमारे पास प्रिंटर है

play15:09

अमन तो हमारे पास जो आउटपुट आएगा ट्वीट भी

play15:13

एंड्रॉएड

play15:14

ना तो कुछ इस तरीके से हम इस प्रिंस को

play15:18

रिवर्स करना है अब करने के पीछे छोटा सा

play15:22

होता है उसी तरीके से

play15:25

तरीका देंगे इसमें छोटी सी चीज

play15:30

गांव करते हैं एक की तरह

play15:34

की तरह करेंगे तो क्या होगा हम जानते हैं

play15:37

कि थे

play15:40

जिसमें अलग-अलग पॉइंट पर एक अलग एलिमेंट

play15:44

तोड़ होता था है तो यूज लिए के अंदर नंबर

play15:46

हमने फोल्ड करके देखें तो सिर्फ 1234 कुछ

play15:49

इस तरीके से नंबर चार होते थे अब स्क्रीन

play15:51

को भी हम वैसे ही नाज़ुक कर सकते हैं मान

play15:53

लीजिए हम हेलो का एग्जाम पहले तो पहले

play15:56

जरूर ठंडक पर एक है फर्स्ट इंडेक्स पर है

play15:59

ई सेकंड इंडेक्स पर है l थर्ड इंडेक्स पर

play16:02

है को ऑयल और फिल्टर में स्पेसिफिक जिस पर

play16:05

है वो कुछ इस तरीके से हमारे पास हमारी

play16:08

स्ट्रिंग है

play16:09

अब इस ट्रेन में अगर हमें पूरी की पूरी

play16:12

स्प्रिंग और रिवर्स करना है तो हमें एक

play16:15

तरीके से आउटपुट में लेकर आना चाहिए जो

play16:17

लास्ट वाला व है यह तो शुरुआत में आ जाए

play16:20

फिर यह जो ऑयल है यहां पर आ जाए यह वाला

play16:23

है यहां हो यह वाला यहां हो यह वाला इंच

play16:25

यहां हो और एक तरीके से एक नया अगर हम

play16:29

विजुअलाइज करें तो उसको समझेंगे कि वह

play16:32

पहले वाले अरे कि इस तरह की कंपलीटली कॉफी

play16:36

है मतलब इसको पूरा उल्टा करके अगर रख दें

play16:38

तो और रिपोर्ट सुनवाई स्प्रिंग हमारी और

play16:41

इसको उल्टा करके रखने का एक छोटा सा लॉजिक

play16:44

व्यंग्य होगा अगर हम शुरुआत वाले और लास्ट

play16:48

वाले एलिमेंट को आने लाइक करें तो देखते

play16:50

हैं उनके लिए क्या हुआ बॉस एलिमेंट तो

play16:52

लास्ट में चला गया और लास्ट एलिमेंट पर आ

play16:55

गया अब यह को देखें

play16:57

और को देखें तो यहां आ गया और यहां गया और

play17:02

जो है जो मिले लिमिट है वह यहां आ रहा तो

play17:06

उसके सामने क्या समझाओ कि हमें एक तरीके

play17:08

से फोर्स एलिमेंट को उठाना है और लास्ट

play17:10

एलिमेंट को डाल दें लाट्स एलिमेंट को

play17:12

पोस्टपोजिशन वेल एस क्लास पोजीशन पर भेज

play17:15

देंगे तो फ्रंट के जितने भी एलिमेंट है वह

play17:18

बैक पोजीशन पर चले जाएंगे और बैठे जितने

play17:21

भी एलिमेंट है वह फ्रंट पोजीशन पर आ

play17:23

जाएंगे तो हर एक फ्रंट के एलिमेंट को

play17:26

उठाकर

play17:27

बैक पर भेजना है और हर एक बात कि एलिमेंट

play17:30

को उठाकर फ्रंट पर भेजना है तो कुछ इस

play17:33

तरीके से स्प्रिंट को रिपोर्ट करना है और

play17:35

यह जो काम है यह हम इसे 5 मिनट के लिए

play17:37

करने की जरूरत है मतलब इतनी सारी स्प्रिंग

play17:40

में अगर हम क्या करेंगे इन एलिमेंट को

play17:42

पीछे की तरफ बेचते रहेंगे और इन्हीं में

play17:44

कार्बन कॉपी है जिससे कि आप एलिमेंट है

play17:47

उनको आगे की तरफ बढ़ते रहेंगे अब यह जो

play17:50

काम हमें करना है यह में आधी स्प्रिंग के

play17:52

लिए करना है इसका क्या मतलब है कि जैसे ही

play17:55

हम मैच मेलों में से अगर 5 हमारे पास

play18:00

ब्लैक सेम हम सिर्फ आदि स्प्रिंग कंसीडर

play18:03

करें तो इसमें पांच को अगर हम लास्ट में

play18:05

भेज दे तो शुरुआत वाली जगह खाली हो जाएगी

play18:08

उसमें से ऑपरेशन के अंदर हम इसको यहां

play18:11

लेंगे तो यहां लेंगे फिर जाएंगे यहां पर

play18:14

को लास्ट में भेज देंगे उसके बाद यहां जो

play18:17

ऑयल है उसे आगे ले जाएंगे यानी इनको आगे

play18:20

और एक लास्ट एलिमेंट जाएगा जिसको हम आगे

play18:22

लेंगे तो हमारी जो स्ट्रिंग है वह पूरी की

play18:26

पूरी रिपोर्ट हो जाएगी और यह जो लॉजिक है

play18:29

यहां पर तो और हमारे पास एलिमेंट है अगर

play18:31

मान लीजिए यहां पर हमारे पास होता है अमन

play18:34

जिसके अंदर 4 कैरेक्टर यानि इवन थॉ मेरे

play18:37

पास 4mp बॉक्सेस होते तो इसको भी आगे के

play18:39

लिए चलाते अगर यहां पर पांच का आधार ले

play18:42

रहे हैं तीन यहां पर चार का आधा हम लेते

play18:44

12 तो ऐ और के लिए सिर्फ चलता आ जाता

play18:48

लास्ट में हम जाता सेकंड लास्ट पर और जैसे

play18:51

ही एक और लास्ट में वैसे तो लास्ट वाला

play18:53

कैरेक्टर कहां जाता है लास्ट वाला

play18:55

कैरेक्टर एक जगह आ जाता तो यहां पर आ

play18:57

जाएगा इन और जैसे ही एम एक ही जगह जाता है

play19:00

तो एक कहा था इनकी जगह यहां गया तो कुछ इस

play19:04

तरीके से हम शुरू के आगे एलिमेंट को अगर

play19:07

आप फ्री पोजीशन पर ले जाइए तो आखिरी के

play19:09

एलिमेंट को हम उसी टाइम पर उठाकर शुरू

play19:11

वाली पोजीशन पर रखेंगे तो कुछ इस तरीके का

play19:14

लॉजिक हैव स्पृंग में और यह पूरा कपूर इन

play19:16

लॉजिक हम स्प्रिंग बिल्डर की हेल्प से

play19:18

लिखेंगे एनी एक्स्ट्रा लेंगे और उसको

play19:20

रिवर्स करके देखेंगे स्ट्रिंग हम लेते हैं

play19:23

हेलो

play19:25

है अरे क्या करेंगे एक लूप चलाते हैं जब

play19:29

हमें किसी काम को रिपीट करना होता है

play19:30

मिलों की हेल्प से उस काम को रिपीट करते

play19:32

हैं और इस लूप में इंडेक्स जो है आए इज

play19:35

इक्वल टू जीरो से शुरू करेंगे और आए जाएगा

play19:38

एसबीआई डॉट लेंथ कि हमारे स्किन बिल्डर की

play19:41

जो लेंथ है उसके हाफ तक अब हमने देखा कि

play19:44

हम इसे शुरू के हाफ एलिमेंट को उठाकर आखिर

play19:46

में देखने की जरूरत है आखिर वालों को उसी

play19:49

टाइम पर पहले की जगह ला सकते हैं तो इसलिए

play19:52

सिर्फ मिनट्स तक लूप हमारा चल रहा होगा का

play19:54

या इसे कर देते हैं डिवाइड बाय टू आई प्लस

play19:57

प्लस

play19:59

को सबसे पहले इंडेक्स कैलकुलेट कर लेते

play20:02

हैं उसका इंडेक्स इसको हमें रिप्लेस करना

play20:04

है हमें फ्रंट के एक इंडेक्स को रिप्लेस

play20:07

करना है और हमें बैक के कैंडिडेट्स को

play20:09

रिप्लेस करना है और फ्रंट के इस इंडेक्स

play20:11

कम रिप्लेस करें डिटेल्स आए और बैक के जिस

play20:15

इंडेक्स को रिप्लेस करेंगे टिप्स एसबीआई

play20:17

डॉट लेंथ माइनस वन - हाय आई हॉप थी यह

play20:22

वाले जो लाइन है यह सब को समझ में आई होगी

play20:25

शुरुआत से जो एलिमेंट फ्रंट का जो एलिमेंट

play20:28

हम उठाकर पीछे पैक रहे हैं उसका इंडेक्स

play20:30

नोएडा वाले सारे अलार्म्स को उठाकर पीछे

play20:33

रखे हैं और बैक से मतलब कहां पीछे रहते

play20:36

हैं उनको फांसी प्रदर्शन पर आयत एलिमेंट

play20:38

को हम एसबी डॉट लेंथ - आए माइनस वन पर

play20:42

पीछे रखे हैं यानी अगर 5 हमारे पास

play20:45

कैरेक्टर है जैसे हेलो के अंदर पांच

play20:47

कैरेक्टर है हमारे पास तो जरूरत पोजीशन पर

play20:50

जो है यानी एक जो है वह कहां जाएगा जरूर

play20:54

1234 पोजीशन पर फॉर यानी 5 - जीरो - 121

play20:59

तो यहां पर जो लॉजिक बनने डिटेल्स साइंस -

play21:02

52 -

play21:04

205 इस तरीके से इसका आंसर जो है वह पूरा

play21:07

आएगा हमारे पास तो एच को हम फोर्स एंड

play21:10

वैज्ञानिकों की जगह देंगे अब इसके बाद

play21:13

कैरेक्टर्स कैलकुलेट कर लेते हैं यह फ्रंट

play21:15

वाला कैरेक्टर कैन हैव सैंक्शंड और बैक

play21:17

वाला कैरेक्टर कौन से टिप्स पर तो खैर

play21:20

फ्रंट कैरेक्टर इज इक्वल टू

play21:23

हमारा कैरेक्टर विच

play21:26

sbi.co.in

play21:28

टेक केयर बैक कैरेक्टर इज इक्वल टू ए पी

play21:32

डॉक्टर बैक यहां पर इस आयोग को भी हम

play21:36

फ्रेंड्स रिप्लेस कर सकते हैं तो फ्रंट

play21:38

डायरेक्टर हमने निकाल लिया और बात

play21:40

कैरेक्टर हमने निकाल लिया अब क्या करना है

play21:42

फ्रंट कैरेक्टर को रिप्लेस करना है बैक

play21:45

कैरेक्टर से बात कैरेक्टर को रिप्लेस करना

play21:47

फ्रंट कैरेक्टर से और यह काम जावा के अंदर

play21:49

हम कैसे करते हैं चावल के अंदर यूज करेंगे

play21:51

इसलिए बिल्डर्स का फंक्शन सेट कर सेट सेट

play21:54

कर मतलब उस कैरेक्टर को सेट कर दीजिए वो

play21:58

तो ए पी डॉट सेट कैरेट

play22:01

फ्रंट का जो इंडेक्स है उसकी जगह हम बैक

play22:04

का कैरेक्टर पास कर देंगे

play22:06

और बैक टो इंडेक्स है उसकी जगह हम पास कर

play22:10

देंगे अपना फ्रंट कैरेक्टर अनुसार क्या

play22:14

करेंगे उसके बाद जब हम अपनी स्ट्रिंग को

play22:17

प्रिंट करवा देंगे तो इसको एक बार राइड

play22:19

करते हैं इनिशियली स्प्रिंग बिल्डर में

play22:21

स्पोर्ट्स हेलो और फाइनल आंसर है वह मेल

play22:24

इंच यह कैसे आया सबसे पहले हमने खिलाफ

play22:27

चलाया जड़ों से लेकर सिंह मर्डर की आधी

play22:30

लंच तक उसमें हमने फ्रंट इंडेक्स और बैक

play22:33

इंडेक्स कैलकुलेटर जिनको में रिप्लेस करना

play22:35

है दूसरे से तो फ्रंट इंडेक्स में पता

play22:38

युद्ध बैक इंडेक्स हमने पता किया कि किस

play22:40

तरीके से काम के लिए हुआ उसके बाद वहां पर

play22:43

उन्हें इंडेक्स फ्रंट और बैक इन पर जो भी

play22:44

कैरेक्टर सपोर्ट से हमने उसको निकाल दिया

play22:46

तो फ्रेंड कैरेक्टर को और बढ़ा कैरेक्टर

play22:48

को निकाला डोंट कैरेट फंक्शन की हेल्प से

play22:51

फिर हमने सेट कैरेट फंक्शन का यूज किया

play22:53

स्ट्रींगबिल्डर में इसमें फ्रंट वाला जो

play22:55

इंडेक्स है वह उसको रिप्लेस कर दिया बात

play22:57

कैरेक्टर क्वालिटी इंडेक्स को रिप्लेस कर

play22:59

दिया फ्रंट कैरेक्टर तो कुछ इस तरीके का

play23:02

काम हुआ कि अगर हमारे पास सिक्स प्रिंस थी

play23:04

हेलो

play23:05

अगस्टिन थी हेलो दो

play23:09

है तो सबसे पहले हमने इस कैरेक्टर और इस

play23:11

कैरेक्टर को रिप्लेस कर दिया मतलब

play23:13

एक्सचेंज कर दिया यहां पर वह आ गया यहां

play23:15

पर आ गया इस फिर हमने इसको इसको रिप्लेस

play23:18

किया टेक्स्ट लांच किया तो यहां पर हमारे

play23:20

पास आ गया ऑयल और यह हमारा यहां पर अंधेरे

play23:23

यहां का यहां सीधे हमारे पास आ गया तो उस

play23:25

रिंग में एक रेस्टोरेंट हमारे पास आ गई तो

play23:29

इस तरीके से हम कोड लिखते हैं अगर इसको की

play23:32

टाइम कंपलेक्सिटी निकाले तो एक कोड कहां

play23:34

तक रानी कि यह ग्रुप को डांस करेगा जीरो

play23:36

से लेकर एंड व्हाइट तक और यह जो android2

play23:40

है यह कांस्टेंट है जिसको हम इग्नोर कर

play23:42

सकते हैं तो इस पूरे के पूरे कोड भी जो

play23:44

टाइम कंपलेक्सिटी होगी व होगी बेखोफ एन तो

play23:47

कुछ इस तरीके से स्प्रिंग बिल्डर्स का हम

play23:49

यूज करते हैं और इस तरीके से रिवर्स

play23:51

स्विंग का हमको लिख सकते हैं अब नीचे आज

play23:53

के लेक्चर के नोट्स इन कोर्स आपको मिल रहे

play23:55

होंगे साथ के साथ प्रिंस की जो प्रॉब्लम्स

play23:57

क्लास क्लास में उनके सलूशन समय अपडेट कर

play24:00

दिए हैं उसी चीज के अंदर आज के लिए इतना

play24:02

ही आए हो आज हम इस पिन बिल्डर्स के बारे

play24:04

में काफी कुछ सीखने को मिलेगा नेक्स्ट

play24:06

क्लास में बात कर रहे होंगे

play24:07

एडमिनिस्ट्रेशन के बारे में शुक्र उसी के

play24:09

साथ हमारी जो जावा बेसिक है वह खत्म हो

play24:12

रहे होंगे मतलब पूरा शुरुआत से लेकर

play24:13

उन्हें पूरी की पूरी बेसिक जवा कि 15 16

play24:16

क्लासेस कंप्लीट कर ली है आई होप कि बहुत

play24:19

सारी प्रॉब्लम सॉल्व कर रहे होंगे बहुत

play24:21

सारी प्रैक्टिस हम करेंगे इन काफी ज्यादा

play24:22

जावा के बारे में सीख रहे होंगे आज के लिए

play24:25

इतना ही मिलते हैं नेक्स्ट वीडियो में

play24:26

चिल्ड्रन की प्लानिंग एंड कीप

play24:27

एक्सप्लोरिंग थे

Rate This

5.0 / 5 (0 votes)

Étiquettes Connexes
Java ProgrammingStringBuilderString ManipulationCode OptimizationMemory ManagementDeveloper TipsCoding TechniquesSoftware DevelopmentEfficiency TipsProgramming Best Practices
Besoin d'un résumé en anglais ?