<?xml version="1.0" encoding="UTF-8" standalone="no"?><rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:blogger="http://schemas.google.com/blogger/2008" xmlns:gd="http://schemas.google.com/g/2005" xmlns:georss="http://www.georss.org/georss" xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/" xmlns:thr="http://purl.org/syndication/thread/1.0" version="2.0"><channel><atom:id>tag:blogger.com,1999:blog-2277500076249553811</atom:id><lastBuildDate>Tue, 13 May 2025 12:32:11 +0000</lastBuildDate><category>Java</category><category>programming</category><category>python</category><category>Kotlin</category><category>php</category><category>questions</category><category>tutorial</category><title>Script Squad- Where Coding Meets Creativity</title><description>This is the Feed for The Script Squad</description><link>https://scriptsquad.blogspot.com/</link><managingEditor>noreply@blogger.com (Pranav Mohan)</managingEditor><generator>Blogger</generator><openSearch:totalResults>6</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2277500076249553811.post-8221498445283553817</guid><pubDate>Thu, 09 Mar 2023 16:51:00 +0000</pubDate><atom:updated>2023-03-09T08:51:54.152-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Java</category><category domain="http://www.blogger.com/atom/ns#">questions</category><title>Java Interview Questions for Freshers | Best Questions 2023</title><description>&lt;h2 style="text-align: left;"&gt;Java Interview Questions for Freshers | Best Questions 2023&lt;/h2&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEheYG7380vw-8qCaSYvo1O_Lg3xoOrKQjTHH6W4qj7WXrYq6Q-lu2V86R2kz9cutpu-FCCphM9zVCHfd_VJa6hC57XgxPsZ_v_PBvaG83FUW8Yw9aLlktD-oYbGXxEDRI7ZQ7L_PALa-NE9z6QLova3eAnCEGaMbAVBEcM_wnsUBRtvBT_BiBYfld3n/s484/java.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img alt="java interview question for freshers" border="0" data-original-height="358" data-original-width="484" height="399" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEheYG7380vw-8qCaSYvo1O_Lg3xoOrKQjTHH6W4qj7WXrYq6Q-lu2V86R2kz9cutpu-FCCphM9zVCHfd_VJa6hC57XgxPsZ_v_PBvaG83FUW8Yw9aLlktD-oYbGXxEDRI7ZQ7L_PALa-NE9z6QLova3eAnCEGaMbAVBEcM_wnsUBRtvBT_BiBYfld3n/w539-h399/java.jpg" width="539" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;p&gt;&lt;b&gt;Do you need&amp;nbsp;&lt;span face="Söhne, ui-sans-serif, system-ui, -apple-system, &amp;quot;Segoe UI&amp;quot;, Roboto, Ubuntu, Cantarell, &amp;quot;Noto Sans&amp;quot;, sans-serif, &amp;quot;Helvetica Neue&amp;quot;, Arial, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;, &amp;quot;Noto Color Emoji&amp;quot;" style="color: #343541; font-size: 16px; white-space: pre-wrap;"&gt;java interview questions for freshers?&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;span face="Söhne, ui-sans-serif, system-ui, -apple-system, &amp;quot;Segoe UI&amp;quot;, Roboto, Ubuntu, Cantarell, &amp;quot;Noto Sans&amp;quot;, sans-serif, &amp;quot;Helvetica Neue&amp;quot;, Arial, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;, &amp;quot;Noto Color Emoji&amp;quot;" style="color: #343541; font-size: 16px; white-space: pre-wrap;"&gt;Here are the best interview questions for 2023.&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p style="text-align: left;"&gt;Java is one of the most popular programming languages in the world. As a fresher looking to start a career in Java programming, it is essential to be prepared for interviews. In this article, we will cover some common Java interview questions for freshers and provide detailed answers to help you prepare for your next job interview.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;h3 style="text-align: left;"&gt;What is Java?&lt;/h3&gt;&lt;p&gt;Java is a general-purpose programming language that is designed to be platform-independent, meaning it can run on any platform without any modifications. Java code is compiled into bytecode, which can be run on any Java Virtual Machine (JVM).&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;h3 style="text-align: left;"&gt;What is the difference between JDK, JRE, and JVM?&lt;/h3&gt;&lt;p&gt;JDK (Java Development Kit) is a software development kit that includes everything required to develop and run Java applications, including a compiler, debugger, and other tools.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;JRE (Java Runtime Environment) is a software package that provides the environment needed to run Java applications on a machine. It includes the JVM and other libraries required to run Java applications.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;JVM (Java Virtual Machine) is the platform on which Java code is executed. It interprets the compiled bytecode and executes it on the machine.&lt;/p&gt;&lt;h3 style="text-align: left;"&gt;&lt;br /&gt;What is the difference between == and equals() method in Java?&lt;/h3&gt;&lt;p&gt;The == operator in Java is used to compare the reference values of two objects. It checks if the two objects refer to the same memory location.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;The equals() method, on the other hand, is used to compare the content of two objects. It checks if the two objects have the same values.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;h3 style="text-align: left;"&gt;What is the difference between an abstract class and an interface in Java?&lt;/h3&gt;&lt;p&gt;An abstract class is a class that cannot be instantiated. It is used as a base class for other classes and can contain both abstract and concrete methods.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;An interface, on the other hand, is a collection of abstract methods that do not have any implementation. It is used to define a contract that a class must implement.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;h3 style="text-align: left;"&gt;What is polymorphism in Java?&lt;/h3&gt;&lt;p&gt;Polymorphism is the ability of an object to take many forms. In Java, polymorphism is achieved through method overloading and method overriding.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Method overloading is when a class has two or more methods with the same name but different parameters.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Method overriding is when a subclass provides its implementation for a method that is already defined in its parent class.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;h3 style="text-align: left;"&gt;What is the difference between final, finally, and finalize in Java?&lt;/h3&gt;&lt;p&gt;The final keyword is used to make a variable, method, or class immutable, meaning it cannot be modified.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;The finally block is used to execute code after a try-catch block, regardless of whether an exception is thrown or not.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;The finalize() method is called by the garbage collector when it is about to destroy an object. It can be used to perform any cleanup operations before the object is destroyed.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;h3 style="text-align: left;"&gt;What is the difference between a stack and a queue?&lt;/h3&gt;&lt;p&gt;A stack is a Last-In-First-Out (LIFO) data structure, meaning the last element that was added to the stack will be the first one to be removed.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;A queue is a First-In-First-Out (FIFO) data structure, meaning the first element that was added to the queue will be the first one to be removed.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;h3 style="text-align: left;"&gt;What is the difference between an ArrayList and a LinkedList in Java?&lt;/h3&gt;&lt;p&gt;An ArrayList is a resizable array that can store any type of data. It is faster than a LinkedList when accessing elements randomly.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;A LinkedList is a collection of nodes that are linked to each other. It is faster than an ArrayList when inserting or deleting elements.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;h3 style="text-align: left;"&gt;What is the difference between a synchronized method and a synchronized block in Java?&lt;/h3&gt;&lt;p&gt;A synchronized method is a method that is locked for a single thread of execution. It can be used to prevent multiple threads from accessing the same data at the same time.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;A synchronized block is a part of a code that is executed by only one thread at a time. The code is surrounded by the synchronized keyword, and it ensures that multiple threads cannot execute the same code simultaneously. This is useful when multiple threads need to access shared resources, as it prevents them from interfering with each other.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;h3 style="text-align: left;"&gt;What is an Interface in Java?&lt;/h3&gt;&lt;p&gt;An interface in Java is a blueprint of a class. It specifies a set of methods and constants that a class implementing the interface must implement. An interface is used to achieve abstraction in Java, and it allows classes to be developed independently of each other while still providing a common interface.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;What is the difference between an abstract class and an interface?&lt;/p&gt;&lt;p&gt;An abstract class is a class that cannot be instantiated, and it is typically used as a base class for other classes. It can contain abstract and concrete methods and have both public and protected access modifiers.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;An interface, on the other hand, is a collection of method signatures without any implementation. It can be implemented by any class, and a single class can implement multiple interfaces. An interface can only have public methods, and all methods in an interface are abstract.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;h3 style="text-align: left;"&gt;What is method overloading in Java?&lt;/h3&gt;&lt;p&gt;Method overloading in Java is a technique that allows a class to have multiple methods with the same name, but with different parameters. When a method is called, Java determines which version of the method to call based on the number and types of arguments passed to it. This allows developers to create more concise and readable code by giving methods descriptive names.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;h3 style="text-align: left;"&gt;What is method overriding in Java?&lt;/h3&gt;&lt;p&gt;Method overriding in Java is a technique that allows a subclass to provide a different implementation of a method that is already defined in its superclass. When a method is called on an object of the subclass, the implementation in the subclass is executed instead of the implementation in the superclass.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;h3 style="text-align: left;"&gt;What is a constructor in Java?&lt;/h3&gt;&lt;p&gt;A constructor in Java is a special method that is used to initialize objects. It has the same name as the class and no return type. When an object is created, Java automatically calls the constructor to initialize the object's variables and state.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;In conclusion, preparing for a Java interview as a fresher can be intimidating, but with the right guidance and practice, it can be a rewarding experience. Knowing these common Java interview questions and how to answer them will give you a better chance of landing your dream job. Remember to stay calm, be confident, and always show your enthusiasm for the language and its applications. With determination and hard work, you can excel in any Java interview and jumpstart your career as a successful Java developer.&lt;/p&gt;</description><link>https://scriptsquad.blogspot.com/2023/03/java-interview-questions-for-freshers.html</link><author>noreply@blogger.com (Pranav Mohan)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEheYG7380vw-8qCaSYvo1O_Lg3xoOrKQjTHH6W4qj7WXrYq6Q-lu2V86R2kz9cutpu-FCCphM9zVCHfd_VJa6hC57XgxPsZ_v_PBvaG83FUW8Yw9aLlktD-oYbGXxEDRI7ZQ7L_PALa-NE9z6QLova3eAnCEGaMbAVBEcM_wnsUBRtvBT_BiBYfld3n/s72-w539-h399-c/java.jpg" width="72"/><thr:total>0</thr:total><georss:featurename>India</georss:featurename><georss:point>20.593684 78.96288</georss:point><georss:box>-7.7165498361788458 43.80663 48.903917836178849 114.11913</georss:box></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2277500076249553811.post-6432716472081680915</guid><pubDate>Wed, 08 Mar 2023 11:55:00 +0000</pubDate><atom:updated>2023-03-08T03:56:22.915-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">php</category><category domain="http://www.blogger.com/atom/ns#">programming</category><title> PHP in Programming: The Language That Powers the Web </title><description>&lt;h2 style="text-align: left;"&gt;&amp;nbsp;PHP in Programming: The Language That Powers the Web (with a
Touch of Humor)&lt;/h2&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiPy43RlJfN2QSmNOKRA_1Ng0T5TuNYvzx7L5O_4Ull9zu5OBJ86BHVPOa27KgDIq0nEvhQ8GqaOjtoP2OfAVsDNo19G5IjA_GekW5XODzVD1eBy9-HwLGXq-lZWEPRmzWbBvWGqI51ExuLiNeAQfqiaL6OnmiZAeff85UcM6q-N0A-YnNQmUiwK_Aw/s760/blog.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img alt="PHP is a very popular language used to create websites." border="0" data-original-height="400" data-original-width="760" height="336" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiPy43RlJfN2QSmNOKRA_1Ng0T5TuNYvzx7L5O_4Ull9zu5OBJ86BHVPOa27KgDIq0nEvhQ8GqaOjtoP2OfAVsDNo19G5IjA_GekW5XODzVD1eBy9-HwLGXq-lZWEPRmzWbBvWGqI51ExuLiNeAQfqiaL6OnmiZAeff85UcM6q-N0A-YnNQmUiwK_Aw/w640-h336/blog.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;p class="MsoNormal"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;b&gt;If you're a developer, chances are you've heard of PHP - the
scripting language that powers the web. But if you're not a developer, you
might be wondering what PHP is all about. Well, don't worry, because, in this
article, we'll explore the ins and outs of PHP and how it's used in
programming.&lt;/b&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;But before we dive into the technical details, let's start
with some humour. Yes, humour. Because let's face it, programming can be dry and
dull. So let's spice things up a bit with some jokes about PHP.&lt;/p&gt;

&lt;p class="MsoNormal"&gt;Why did the PHP developer go broke?&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;Because he used up all his arrays!&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;Okay, maybe that wasn't the best joke, but let's move on.
Here's another one:&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;Why did the programmer quit his job?&lt;/p&gt;

&lt;p class="MsoNormal"&gt;He didn't get arrays.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;Alright, enough with the jokes. Let's get down to business.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;

&lt;h3 style="text-align: left;"&gt;What is PHP?&lt;/h3&gt;&lt;p class="MsoNormal"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;PHP (which stands for Hypertext Preprocessor) is a
server-side scripting language that is used to create dynamic web pages. It was
originally created in 1994 by Rasmus Lerdorf as a set of Common Gateway
Interface (CGI) scripts to help him manage his personal website. Since then, it
has evolved into a full-fledged programming language that is used by millions
of developers around the world.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;PHP is a free and open-source language, which means that
anyone can use it and contribute to its development. It is also highly
versatile and can be used to create a wide range of web applications, from
simple personal websites to complex e-commerce platforms and social networking
sites.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;

&lt;h3 style="text-align: left;"&gt;Why use PHP?&lt;/h3&gt;&lt;p class="MsoNormal"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;So, why use PHP? Well, there are several reasons:&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;

&lt;h4 style="text-align: left; text-indent: -18pt;"&gt;1.&lt;span style="font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;!--[endif]--&gt;It's easy to learn&lt;/h4&gt;&lt;p class="MsoListParagraph" style="mso-list: l0 level1 lfo1; text-indent: -18.0pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;Compared to other programming languages, PHP has a
relatively simple and intuitive syntax that is easy to learn. This makes it a
popular choice for beginners and experienced developers alike.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;

&lt;h4 style="text-align: left; text-indent: -18pt;"&gt;2.&lt;span style="font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;!--[endif]--&gt;It's scalable&lt;/h4&gt;&lt;p class="MsoListParagraph" style="mso-list: l0 level1 lfo1; text-indent: -18.0pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;PHP is highly scalable and can handle a large volume of
traffic, which makes it a popular choice for websites and web applications with
high traffic.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;

&lt;h4 style="text-align: left; text-indent: -18pt;"&gt;3.&lt;span style="font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;!--[endif]--&gt;It's cost-effective&lt;/h4&gt;&lt;p class="MsoListParagraph" style="mso-list: l0 level1 lfo1; text-indent: -18.0pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;PHP is open-source and free to use, which makes it a
cost-effective option for web development.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;

&lt;h4 style="text-align: left; text-indent: -18pt;"&gt;4.&lt;span style="font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;!--[endif]--&gt;It's versatile&lt;/h4&gt;&lt;p class="MsoListParagraph" style="mso-list: l0 level1 lfo1; text-indent: -18.0pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;PHP can be used for a wide range of applications, from
simple personal websites to complex e-commerce platforms and social networking
sites.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;

&lt;h3 style="text-align: left; text-indent: -18pt;"&gt;5.&lt;span style="font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;!--[endif]--&gt;What can you do with PHP?&lt;/h3&gt;&lt;p class="MsoListParagraph" style="mso-list: l0 level1 lfo1; text-indent: -18.0pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;With PHP, the possibilities are endless. Here are just a few
examples of what you can do with PHP:&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;

&lt;h4 style="text-align: left; text-indent: -18pt;"&gt;1.&lt;span style="font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1.&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;!--[endif]--&gt;Create a blog&lt;/h4&gt;&lt;p class="MsoListParagraph" style="mso-list: l1 level1 lfo2; text-indent: -18.0pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;PHP is the language that powers popular blogging platforms
like WordPress. With PHP, you can create your own blogging platform or
customize an existing one to suit your needs.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;

&lt;h4 style="text-align: left; text-indent: -18pt;"&gt;2.&lt;span style="font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2.&amp;nbsp;&lt;/span&gt;&lt;!--[endif]--&gt;Build an e-commerce site&lt;/h4&gt;&lt;p class="MsoListParagraph" style="mso-list: l1 level1 lfo2; text-indent: -18.0pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;PHP is also used to create e-commerce platforms like Magento
and WooCommerce. With PHP, you can create an online store with features like
product catalogue management, order management, and payment processing.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;

&lt;h4 style="text-align: left; text-indent: -18pt;"&gt;3.&lt;span style="font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;3.&amp;nbsp;&amp;nbsp;&lt;/span&gt;Develop a social networking site&lt;/h4&gt;&lt;p class="MsoListParagraph" style="mso-list: l1 level1 lfo2; text-indent: -18.0pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;PHP is the language that powers popular social networking
sites like Facebook. With PHP, you can create your own social networking site
with features like user profiles, status updates, and messaging.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;

&lt;h4 style="text-align: left; text-indent: -18pt;"&gt;4.&lt;span style="font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;4.&amp;nbsp;&lt;/span&gt;Create a content management system&lt;/h4&gt;&lt;p class="MsoListParagraph" style="mso-list: l1 level1 lfo2; text-indent: -18.0pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;PHP is also used to create content management systems like
Drupal and Joomla. With PHP, you can create a website with features like user
authentication, content editing, and publishing.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;

&lt;h3 style="text-align: left;"&gt;Conclusion&lt;/h3&gt;&lt;p class="MsoNormal"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;So there you have it - a brief overview of PHP in
programming. While it may not be the most exciting language out there, it is
certainly one of the most powerful and versatile. With PHP, you can create a
wide range of web applications that are scalable, cost-effective, and easy to
use.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;b&gt;And if you're a developer, remember - always keep your
arrays in check.&lt;/b&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;</description><link>https://scriptsquad.blogspot.com/2023/03/php-in-programming.html</link><author>noreply@blogger.com (Pranav Mohan)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiPy43RlJfN2QSmNOKRA_1Ng0T5TuNYvzx7L5O_4Ull9zu5OBJ86BHVPOa27KgDIq0nEvhQ8GqaOjtoP2OfAVsDNo19G5IjA_GekW5XODzVD1eBy9-HwLGXq-lZWEPRmzWbBvWGqI51ExuLiNeAQfqiaL6OnmiZAeff85UcM6q-N0A-YnNQmUiwK_Aw/s72-w640-h336-c/blog.png" width="72"/><thr:total>0</thr:total><georss:featurename>India</georss:featurename><georss:point>20.593684 78.96288</georss:point><georss:box>-7.7165498361788458 43.80663 48.903917836178849 114.11913</georss:box></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2277500076249553811.post-6079278350060479808</guid><pubDate>Wed, 01 Mar 2023 11:58:00 +0000</pubDate><atom:updated>2023-03-04T03:54:40.932-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Java</category><category domain="http://www.blogger.com/atom/ns#">programming</category><title>Java Questions for Practice: Test Your Knowledge and Have Fun</title><description>&lt;h2&gt;Java Questions for Practice: Test Your Knowledge and Have Fun!&lt;/h2&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhMU9-8xgjlZTTbtW2J3RzXs4Q8xt45fDLfWZOnd55H3tx-67gRq_QuxW02fptMdjq1FuF7C3-tw4qbZKPDaxZlDmm2edOdTaUm09m9XmT_6LH75VGE0sZObJnUjDGGhwLYynS2Swc88qKg221TqcGlVxQmPG8NVC1Dscupj89TXvp9Be4WgcFhiwfq/s567/web-design-2906159__340.jpg" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img alt="We provide simple and interesting explanations for difficult questions." border="0" data-original-height="340" data-original-width="567" height="384" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhMU9-8xgjlZTTbtW2J3RzXs4Q8xt45fDLfWZOnd55H3tx-67gRq_QuxW02fptMdjq1FuF7C3-tw4qbZKPDaxZlDmm2edOdTaUm09m9XmT_6LH75VGE0sZObJnUjDGGhwLYynS2Swc88qKg221TqcGlVxQmPG8NVC1Dscupj89TXvp9Be4WgcFhiwfq/w640-h384/web-design-2906159__340.jpg" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Here are some &lt;b&gt;Java Questions for Practice.&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Learn Java easily with our simple and fun explanations.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;h4 style="text-align: left;"&gt;&amp;nbsp;Java is a strong and popular programming language
that is used to create everything from mobile games to web applications. Java
practice questions are a great way to hone your skills, whether you're a
beginner learning Java for the first time or an experienced programmer looking
to advance your abilities. We'll go over some typical Java practice questions
in this article to help you learn the language while having fun.&lt;/h4&gt;

&lt;p class="MsoNormal" style="line-height: 115%; margin-bottom: 10pt; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span lang="EN"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;

&lt;h2 style="line-height: 115%; margin-bottom: 10pt; text-align: left;"&gt;&lt;span lang="EN"&gt;Q1-What distinguishes an object from a class?&lt;/span&gt;&lt;/h2&gt;

&lt;p class="MsoNormal" style="line-height: 115%; margin-bottom: 10pt; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span lang="EN"&gt;Ah, the age-old conundrum that confounds
newcomers every time. An object is an instance of a class, while a class is
like a blueprint for an object. Consider an object as a cookie recipe and a
class as a specific batch of cookies that you've baked using that recipe. You
can make as many batches of cookies as you want using the same recipe (class),
but each batch (object) will be unique.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class="MsoNormal" style="line-height: 115%; margin-bottom: 10pt; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span lang="EN"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;

&lt;h2 style="line-height: 115%; margin-bottom: 10pt; text-align: left;"&gt;&lt;span lang="EN"&gt;Q2-What's the difference between a constructor and a
method?&amp;nbsp;&lt;/span&gt;&lt;/h2&gt;&lt;p class="MsoNormal" style="line-height: 115%; margin-bottom: 10pt; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span lang="EN"&gt;Another classic question that beginners often stumble over. A
constructor is a special method used to create an instance of a class (object).
It has the same name as the class and has no return type. Methods, on the other
hand, are ordinary functions that perform actions or return values. Think of
the constructor as the worker who builds a house, and the method as the worker
who paints the house. The constructor is responsible for creating the house (object)
and the method performs some actions on the house (object).&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="line-height: 115%; margin-bottom: 10pt; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span lang="EN"&gt;Read More: &lt;a href="https://scriptsquad.blogspot.com/2023/02/java-program-for-prime-numbers.html"&gt;Java Program for Prime Numbers&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;

&lt;h2 style="line-height: 115%; margin-bottom: 10pt; text-align: left;"&gt;&lt;span lang="EN"&gt;Q3-What is the difference between an abstract class
and an interface?&amp;nbsp;&lt;/span&gt;&lt;/h2&gt;&lt;p class="MsoNormal" style="line-height: 115%; margin-bottom: 10pt; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span lang="EN"&gt;An abstract class is a class that cannot be instantiated
(objects cannot be created from it) but can be extended by other classes. It
can contain abstract methods (methods without a body) that any class that
extends it must implement. Interfaces are like abstract classes in that they
cannot be instantiated and contain only abstract methods (no concrete methods
with bodies). Any class that implements an interface must provide
implementations for all of its methods.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class="MsoNormal" style="line-height: 115%; margin-bottom: 10pt; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span lang="EN"&gt;Think of an abstract class as a blueprint for a
building. An interface is like a contractor's contract. The blueprint gives a
general idea of ​​what the building will look and function like, while the
contract specifies what work needs to be done by when.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;h2 style="line-height: 115%; margin-bottom: 10pt; text-align: left;"&gt;&lt;span lang="EN"&gt;Q-3What is the difference between the equals()
method and the == operator?&amp;nbsp;&lt;/span&gt;&lt;/h2&gt;&lt;p class="MsoNormal" style="line-height: 115%; margin-bottom: 10pt; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span lang="EN"&gt;The equals() method is the method used to compare
two objects for equality. Compare object values, not memory addresses. The ==
operator, on the other hand, compares the memory addresses of two objects to
determine if they are the same object.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class="MsoNormal" style="line-height: 115%; margin-bottom: 10pt; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span lang="EN"&gt;Think of the equals() method as a matchmaking
service that compares two people's personalities and interests to see if they
are compatible. The == operator, on the other hand, is like a security guard,
checking your identity to make sure you agree.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;h2 style="line-height: 115%; margin-bottom: 10pt; text-align: left;"&gt;&lt;span lang="EN"&gt;Q4-What is the difference between stack and queue?&lt;/span&gt;&lt;/h2&gt;&lt;p class="MsoNormal" style="line-height: 115%; margin-bottom: 10pt; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span lang="EN"&gt;&amp;nbsp;A
stack is a data structure that stores data in a last-in, first-out (LIFO)
fashion. This means that the last item added to the stack will be the first
item removed from the stack.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class="MsoNormal" style="line-height: 115%; margin-bottom: 10pt; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span lang="EN"&gt;A queue, on the other hand, is a data structure
that stores data on a first-in, first-out (FIFO) basis. This means that the
first item added to the queue is the first item removed from the queue.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class="MsoNormal" style="line-height: 115%; margin-bottom: 10pt; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span lang="EN"&gt;Think of a stack as a stack of pancakes where the
last added pancake is eaten first. A queue, on the other hand, is like a queue
in a movie theater where the first person in line arrives at the cinema first.
What is the difference between checked and unchecked exceptions?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;h2 style="line-height: 115%; margin-bottom: 10pt; text-align: left;"&gt;&lt;span lang="EN"&gt;Q5- What's the difference between a static method and
a non-static method?&lt;/span&gt;&lt;/h2&gt;

&lt;p class="MsoNormal" style="line-height: 115%; margin-bottom: 10pt; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span lang="EN"&gt;A static method is a method that belongs to the
class itself, rather than to an instance of the class (an object). This means
that you can call a static method without creating an object first. A
non-static method, on the other hand, belongs to an instance of the class and
can only be called on an object.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class="MsoNormal" style="line-height: 115%; margin-bottom: 10pt; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span lang="EN"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;

&lt;p class="MsoNormal" style="line-height: 115%; margin-bottom: 10pt; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span lang="EN"&gt;Think of a static method as a DJ who plays music
for everyone at the party, while a non-static method is like a bartender who
serves drinks to individual guests.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class="MsoNormal" style="line-height: 115%; margin-bottom: 10pt; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span lang="EN"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;

&lt;h2 style="line-height: 115%; margin-bottom: 10pt; text-align: left;"&gt;&lt;span lang="EN"&gt;Q7-What's the difference between a for loop and a
while loop?&lt;/span&gt;&lt;/h2&gt;

&lt;p class="MsoNormal" style="line-height: 115%; margin-bottom: 10pt; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span lang="EN"&gt;A for loop is a loop that iterates a specific
number of times, based on a defined condition. It is often used for iterating
over arrays or collections. A while loop, on the other hand, is a loop that
iterates as long as a specific condition is true.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class="MsoNormal" style="line-height: 115%; margin-bottom: 10pt; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span lang="EN"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;

&lt;p class="MsoNormal" style="line-height: 115%; margin-bottom: 10pt; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span lang="EN"&gt;Think of a for loop as a conveyor belt that moves
a specific number of items past a quality control inspector, while a while loop
is like a treadmill that keeps running until the person on it decides to stop.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class="MsoNormal" style="line-height: 115%; margin-bottom: 10pt; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span lang="EN"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;

&lt;h2 style="line-height: 115%; margin-bottom: 10pt; text-align: left;"&gt;&lt;span lang="EN"&gt;Q6- What's the difference between a StringBuilder and
a StringBuffer?&lt;/span&gt;&lt;/h2&gt;

&lt;p class="MsoNormal" style="line-height: 115%; margin-bottom: 10pt; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span lang="EN"&gt;A StringBuilder and a StringBuffer are both
classes that are used for building strings, but they differ in their
synchronization. StringBuffer is synchronized, which means that it is
thread-safe and can be used in multi-threaded environments. StringBuilder, on
the other hand, is not synchronized, which makes it faster but not thread-safe.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class="MsoNormal" style="line-height: 115%; margin-bottom: 10pt; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span lang="EN"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;

&lt;p class="MsoNormal" style="line-height: 115%; margin-bottom: 10pt; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span lang="EN"&gt;Think of a StringBuilder as a sports car that
goes fast but can only carry one passenger, while a StringBuffer is like a
minivan that can carry multiple passengers but is a bit slower.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class="MsoNormal" style="line-height: 115%; margin-bottom: 10pt; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span lang="EN"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;

&lt;h2 style="line-height: 115%; margin-bottom: 10pt; text-align: left;"&gt;&lt;span lang="EN"&gt;Q8- What's the difference between a HashMap and a
TreeMap?&lt;/span&gt;&lt;/h2&gt;

&lt;p class="MsoNormal" style="line-height: 115%; margin-bottom: 10pt; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span lang="EN"&gt;Both HashMap and TreeMap are classes that
implement the Map interface, but they differ in their ordering. HashMap is
unordered, which means that the order of the elements is not guaranteed.
TreeMap, on the other hand, is ordered based on the natural order of its keys
(or a Comparator, if one is specified).&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class="MsoNormal" style="line-height: 115%; margin-bottom: 10pt; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span lang="EN"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;

&lt;p class="MsoNormal" style="line-height: 115%; margin-bottom: 10pt; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span lang="EN"&gt;Think of a HashMap as a pile of papers that
you're searching through to find a specific document, while a TreeMap is like a
filing cabinet that has everything organized by category and in alphabetical
order.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class="MsoNormal" style="line-height: 115%; margin-bottom: 10pt; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span lang="EN"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;

&lt;p style="line-height: 115%; margin-bottom: 10pt; text-align: left;"&gt;&lt;span lang="EN"&gt;In conclusion, practising with Java questions is
an excellent way to improve your programming skills and deepen your
understanding of the language. By answering these questions, you'll not only
reinforce your knowledge of Java concepts, but you'll also have a bit of fun in
the process. So go ahead, give these questions a try, and see how much you can
learn and enjoy.&lt;/span&gt;&lt;/p&gt;
</description><link>https://scriptsquad.blogspot.com/2023/03/java-questions-for-practice.html</link><author>noreply@blogger.com (Pranav Mohan)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhMU9-8xgjlZTTbtW2J3RzXs4Q8xt45fDLfWZOnd55H3tx-67gRq_QuxW02fptMdjq1FuF7C3-tw4qbZKPDaxZlDmm2edOdTaUm09m9XmT_6LH75VGE0sZObJnUjDGGhwLYynS2Swc88qKg221TqcGlVxQmPG8NVC1Dscupj89TXvp9Be4WgcFhiwfq/s72-w640-h384-c/web-design-2906159__340.jpg" width="72"/><thr:total>0</thr:total><georss:featurename>India</georss:featurename><georss:point>20.593684 78.96288</georss:point><georss:box>-7.7165498361788458 43.80663 48.903917836178849 114.11913</georss:box></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2277500076249553811.post-2094435034211214422</guid><pubDate>Tue, 28 Feb 2023 11:37:00 +0000</pubDate><atom:updated>2023-03-01T04:04:55.357-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Java</category><category domain="http://www.blogger.com/atom/ns#">Kotlin</category><category domain="http://www.blogger.com/atom/ns#">python</category><title>Java vs Kotlin vs Python: Who Wins the Programming Language War?</title><description>&lt;h2 style="text-align: left;"&gt;&lt;br /&gt;&amp;nbsp;Java vs Kotlin vs Python: Who Wins the Programming Language War?&lt;/h2&gt;
&lt;div class="mbtTOC2"&gt; 
&lt;button&gt;Contents &lt;span&gt;[&lt;a id="Tog" onclick="mbtToggle2()"&gt;hide&lt;/a&gt;]&lt;/span&gt;&lt;/button&gt; 
&lt;div id="mbtTOC2"&gt;&lt;/div&gt; 
&lt;/div&gt;
&lt;h4 style="text-align: left;"&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg1q5y_m5Iuo8hQ4XERgjG-CHTq2PI1fkQerTnDfgI877d2q8Gry3TJxCc473Vgsn_gkDt2VFmjx7LY1J1tvwT52fa99E4UmXP2H0LCMtuFjRk302UJpfSsGrA5j9tr9k8ppTD3DxFKyVPPzgR6O3R-UnRwZGq6HU-vIxZ721fApC5JCxDRQRRgJoTX/s1920/programming-gf1829e91d_1920.jpg" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img alt="Who is better- Java, Python or Kotlin?" border="0" data-original-height="1280" data-original-width="1920" height="447" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg1q5y_m5Iuo8hQ4XERgjG-CHTq2PI1fkQerTnDfgI877d2q8Gry3TJxCc473Vgsn_gkDt2VFmjx7LY1J1tvwT52fa99E4UmXP2H0LCMtuFjRk302UJpfSsGrA5j9tr9k8ppTD3DxFKyVPPzgR6O3R-UnRwZGq6HU-vIxZ721fApC5JCxDRQRRgJoTX/w672-h447/programming-gf1829e91d_1920.jpg" width="672" /&gt;&lt;/a&gt;&lt;/div&gt;Programming languages are like superheroes,
each with its own superpowers.&amp;nbsp;&lt;/h4&gt;&lt;p&gt;Java, Python, and Kotlin are three of the
most popular programming languages used by developers today. Each language
has its own strengths and weaknesses and is suitable for different types of
projects.Java, Python, and Kotlin are three of the most popular programming languages ​​used by developers today. Each language has its own strengths and weaknesses and is suitable for different types of projects. This article compares Java, Python, and Kotlin, and hopefully helps you choose the right language for your next project.&lt;/p&gt;

&lt;h3 style="line-height: 115%; margin-bottom: 10pt; text-align: left;"&gt;&lt;span lang="EN"&gt;Syntax&lt;/span&gt;&lt;/h3&gt;

&lt;p class="MsoNormal" style="line-height: 115%; margin-bottom: 10pt; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span lang="EN"&gt;Java's syntax is verbose and requires a lot of
boilerplate code. Since the tip system is strict, it may be difficult for
beginners. Python, on the other hand, has a looser syntax and is easier to read
and write. Its dynamic typing system eliminates the need to declare variables
before using them, making the language more forgiving. Developed by JetBrains,
Kotlin has a concise and expressive syntax. It combines the best features of
Java and Python to make programming fun.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;h3 style="line-height: 115%; margin-bottom: 10pt; text-align: left;"&gt;&lt;span lang="EN"&gt;Performance&lt;/span&gt;&lt;/h3&gt;

&lt;p class="MsoNormal" style="line-height: 115%; margin-bottom: 10pt; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span lang="EN"&gt;Java is known for its power. It uses a Java
Virtual Machine (JVM) that provides an abstraction layer between hardware and
software. This makes it independent of the Java platform. This means that code
written on one platform can run unchanged on another. Python is an interpreted
language, so it can be slower than compiled languages ​​like Java. However,
there are tools like PyPy that can optimize Python code to run faster. Kotlin
is also compiled, so it can be faster than interpreted languages ​​like Python.
It is designed to be more powerful than Java, especially when it comes to
memory usage.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;h3 style="line-height: 115%; margin-bottom: 10pt; text-align: left;"&gt;&lt;span lang="EN"&gt;User Friendliness&lt;/span&gt;&lt;/h3&gt;

&lt;p class="MsoNormal" style="line-height: 115%; margin-bottom: 10pt; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span lang="EN"&gt;Python is one of the easiest languages ​​to learn
and use. Its simple syntax and high level of abstraction make it perfect for
beginners. Java, on the other hand, has a steeper learning curve. It contains
many complex concepts that are hard to understand, such as the JVM and garbage
collection. Kotlin is designed to be easier to use than Java. The simple and
concise syntax makes code easy to read and write. It also has some more
developer-friendly features, such as Null Security and Extensions. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;h3 style="line-height: 115%; margin-bottom: 10pt; text-align: left;"&gt;&lt;span lang="EN"&gt;Community and support&lt;/span&gt;&lt;/h3&gt;

&lt;p class="MsoNormal" style="line-height: 115%; margin-bottom: 10pt; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span lang="EN"&gt;Java has been around for a long time, which means
it has a huge community and support. There are many resources for Java
developers, including documentation, tutorials, and forums. Python also has a
large and active community. Python has many libraries and frameworks, and the
language has a lot of support for data science and machine learning. Kotlin is
a new language, so its community is not as big as Java or Python. However, it
is growing fast, especially in the Android developer community. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;h3 style="line-height: 115%; margin-bottom: 10pt; text-align: left;"&gt;&lt;span lang="EN"&gt;Use Case&lt;/span&gt;&lt;/h3&gt;

&lt;p class="MsoNormal" style="line-height: 115%; margin-bottom: 10pt; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span lang="EN"&gt;Java continues to be the language of choice for
enterprise applications. Many big companies like Amazon and Netflix use it to
build their applications. Java is also a popular choice for building backend
systems such as web servers and databases. Python is great for scripting and
automation tasks. It is also widely used in data science and machine learning. Python
is also a popular language for web development with frameworks like Django and
Flask. Kotlin is mainly used for android development. It's a great choice for
building native Android apps, and its Java interoperability makes it easy to
integrate with your existing Java code.&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="line-height: 115%; margin-bottom: 10pt; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span lang="EN"&gt;Want to learn Java, Check this out! &lt;a href="https://scriptsquad.blogspot.com/2023/02/java-program-for-prime-numbers.html" target="_blank"&gt;Java Tutorial for Absolute Beginners&amp;nbsp;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;h3 style="line-height: 115%; margin-bottom: 10pt; text-align: left;"&gt;&lt;span lang="EN"&gt;Conclusion&lt;/span&gt;&lt;/h3&gt;

&lt;p class="MsoNormal" style="line-height: 115%; margin-bottom: 10pt; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span lang="EN"&gt;Choosing the right programming language is like
choosing the right superhero for the job. Java, Python, and Kotlin are all
great languages ​​with their own strengths and weaknesses. Java is known for
its performance and platform independence, Python is known for its simplicity
and versatility, and Kotlin is known for its ease of use and interoperability
with Java. Carefully consider your needs and requirements when deciding which
language to use for your next project. If you're building enterprise
applications or back-end systems, Java may be your best choice. If you're
working on a data science or machine learning project, Python might be for you.
Kotlin is a good choice if you want to create native Android apps. Ultimately,
when it comes to programming languages, there is no one-size-fits-all solution.
Choosing the right tool for the job is important. Whatever language you choose,
don't forget to have fun with it.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;h4 style="line-height: 115%; margin-bottom: 10pt; text-align: left;"&gt;&lt;span lang="EN"&gt;Programming is about problem-solving and
creativity, so don't be afraid to experiment and try new things. We may be
creating the next big thing in technology!&lt;/span&gt;&lt;/h4&gt;
&lt;script&gt;mbtTOC2();&lt;/script&gt;</description><link>https://scriptsquad.blogspot.com/2023/02/java-vs-kotlin-vs-python.html</link><author>noreply@blogger.com (Pranav Mohan)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg1q5y_m5Iuo8hQ4XERgjG-CHTq2PI1fkQerTnDfgI877d2q8Gry3TJxCc473Vgsn_gkDt2VFmjx7LY1J1tvwT52fa99E4UmXP2H0LCMtuFjRk302UJpfSsGrA5j9tr9k8ppTD3DxFKyVPPzgR6O3R-UnRwZGq6HU-vIxZ721fApC5JCxDRQRRgJoTX/s72-w672-h447-c/programming-gf1829e91d_1920.jpg" width="72"/><thr:total>0</thr:total><georss:featurename>India</georss:featurename><georss:point>20.593684 78.96288</georss:point><georss:box>-7.7165498361788458 43.80663 48.903917836178849 114.11913</georss:box></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2277500076249553811.post-6068293470071716921</guid><pubDate>Sun, 26 Feb 2023 10:46:00 +0000</pubDate><atom:updated>2023-02-28T23:02:57.058-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">programming</category><category domain="http://www.blogger.com/atom/ns#">python</category><category domain="http://www.blogger.com/atom/ns#">tutorial</category><title>The Magic of Loops: A Beginner's Guide to Python Program for Loops</title><description>&lt;h2 style="text-align: left;"&gt;&lt;/h2&gt;&lt;h2 style="text-align: left;"&gt;The Magic of Loops: A Beginner's Guide to Python Program for
Loops&lt;/h2&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjRlyzs-EPyW7SZe7RsGIgoqA4PYcSoyd2cauZHYt3S0nqoauzmtQMVHrON_buUhVZRjvzOqD_7PsW0Wh39E9gfTW8GdZy8p50Hv3__sXOCBU-2J7xT5ldl7DaL31kg7532PWNtANqom2273L3NKivhfXMj_o8q9-lnl6KXZ3ZyTeu1FlJkPc6dtGF6/s1280/web-development-gbf5b30b91_1280.png" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img alt="Python" border="0" data-original-height="1251" data-original-width="1280" height="626" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjRlyzs-EPyW7SZe7RsGIgoqA4PYcSoyd2cauZHYt3S0nqoauzmtQMVHrON_buUhVZRjvzOqD_7PsW0Wh39E9gfTW8GdZy8p50Hv3__sXOCBU-2J7xT5ldl7DaL31kg7532PWNtANqom2273L3NKivhfXMj_o8q9-lnl6KXZ3ZyTeu1FlJkPc6dtGF6/w640-h626/web-development-gbf5b30b91_1280.png" title="Python" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;p class="MsoNormal"&gt;&lt;br /&gt;&lt;/p&gt;&lt;h3 style="text-align: left;"&gt;Need help with Python Program for Loops? We are here to help you out.&lt;/h3&gt;&lt;h3 style="text-align: left;"&gt;Python is a great language to learn for newcomers, especially if you are interested in programming. One of the introductory concepts in Python is the loop. In fact, loops are one of the most important tools in programming. They can help you reiterate through a sequence of items, execute a block of code multiple times, and much else. But, as with all programming topics, loops can be confusing at first. Fear not, however, for we're here to guide you through the magic of loops in Python programming.&amp;nbsp; &amp;nbsp;&lt;/h3&gt;&lt;h2 style="text-align: left;"&gt;Loop&lt;/h2&gt;&lt;h4 style="text-align: left;"&gt;So, what exactly is a loop? Simply put, a loop is a block of code that runs constantly until a certain condition is met. In Python, there are two types of loops the for loop and the while loop.&amp;nbsp;&lt;/h4&gt;&lt;h2 style="text-align: left;"&gt;For and While Loop&lt;/h2&gt;&lt;p&gt;The for loop is used to reiterate over a sequence of items, while the while loop is used to repeat a block of code as long as a certain condition is true.&amp;nbsp; &amp;nbsp;&lt;/p&gt;&lt;h2 style="text-align: left;"&gt;Still don't get it?&lt;/h2&gt;&lt;p&gt;Now, let's add some humour to the blend. Think of a loop as a never-ending roller coaster ride- you keep going around and around until you reach the end. But unlike a roller coaster ride, loops are actually useful. They can help you save time and energy by automating repetitious tasks.&lt;/p&gt;&lt;p&gt;&amp;nbsp;For instance, if you need to print the numbers from 1 to 10, you could write ten separate print statements. But with a loop, you can achieve the same result with just a few lines of code.&amp;nbsp; &amp;nbsp;&lt;/p&gt;&lt;p&gt;But, like any roller coaster ride, loops can be tricky to navigate. The key is to make sure your loop has a clear exit strategy, or else you could end up stuck in an infinite loop. Trust us, you do not want to be stuck in a programming loop like Groundhog Day!&amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;h2 style="text-align: left;"&gt;Infinite Loop&lt;/h2&gt;&lt;p&gt;This is an example of a python infinite loop:&lt;/p&gt;&lt;!--[ Code Box 1 ]--&gt;
  &lt;div class="K2_CBox"&gt;
    &lt;div class="CB_Heading"&gt;&amp;nbsp;&lt;button class="C_box_main" id="copy1" onclick="copyC('copy1','code1')"&gt;
        &lt;i class="CBox_icn"&gt;&lt;/i&gt;
      &lt;/button&gt;
    &lt;/div&gt;

    &lt;!--Add Your Parse HTML code Here--&gt;
    &lt;div id="code1"&gt;
      &lt;pre&gt;while True:
    print("This is an infinite loop!")&lt;/pre&gt;
    &lt;/div&gt;
  &lt;/div&gt;
&lt;style&gt;
  .K2_CBox{position:relative;background:#fff;width:100%;border-radius:6px;box-shadow: rgba(0, 0, 0, 0.15) 1.95px 1.95px 2.6px;padding:10px;margin:30px 0 30px}
  .K2_CBox .CB_Heading{display:flex;justify-content:space-between;align-items:center;margin-bottom:15px}
  .K2_CBox .CB_Heading span{margin:0;font-weight:700;font-family:inherit;font-size:1.1rem}
  .K2_CBox .C_box_main{cursor:pointer;display:inline-flex;align-items:center;padding:12px;outline:0;border:0;border-radius:50%;background:#004cbd;transition:all .3s ease;-webkit-transition:all .3s ease}.K2_CBox .C_box_main:hover{opacity:.8}.K2_CBox .C_box_main .CBox_icn{flex-shrink:0;display:inline-block;width:18px;height:18px;background-image:url("data:image/svg+xml,&lt;svg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='%23fefefe' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' viewBox='0 0 24 24'&gt;&lt;rect x='5.54615' y='5.54615' width='16.45385' height='16.45385' rx='4'/&gt;&lt;path d='M171.33311,181.3216v-8.45385a4,4,0,0,1,4-4H183.787' transform='translate(-169.33311 -166.86775)'/&gt;&lt;/svg&gt;");background-size:cover;background-repeat:no-repeat;background-position:center}
  .K2_CBox .C_box_main.copied{background:#2dcda7}
  .K2_CBox .C_box_main.copied .CBox_icn{background-image:url("data:image/svg+xml,&lt;svg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='%23fefefe' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' viewBox='0 0 24 24'&gt;&lt;path d='M22 11.07V12a10 10 0 1 1-5.93-9.14'/&gt;&lt;polyline points='23 3 12 14 9 11'/&gt;&lt;/svg&gt;")}
  .K2_CBox pre{margin:0;background:#f6f6f6;padding:15px;border-radius:5px;color:#08102b;font-size:.8rem;font-family:monospace;overflow:scroll;scroll-behavior:smooth;scroll-snap-type:x mandatory;-ms-overflow-style:none;-webkit-overflow-scrolling:touch; white-space: pre-wrap;}
  .K2_CBox pre::before, .K2_CBox pre::after{content:''}
  .dark-Mode .K2_CBox{background:#2d2d30}.dark-Mode .K2_CBox pre{background:#252526;color:#fffdfc}
  .tNtf span{position:fixed;left:24px;bottom:-70px;display:inline-flex;align-items:center;text-align:center;justify-content:center;margin-bottom:20px;z-index:99981;background:#323232;color:rgba(255,255,255,.8);font-size:14px;font-family:inherit;border-radius:3px;padding:13px 24px; box-shadow:0 5px 35px rgba(149,157,165,.3);opacity:0;transition:all .1s ease;animation:slideinwards 2s ease forwards;-webkit-animation:slideinwards 2s ease forwards}
  @media screen and (max-width:500px){.tNtf span{margin-bottom:20px;left:20px;right:20px;font-size:13px}}
  @keyframes slideinwards{0%{opacity:0}20%{opacity:1;bottom:0}50%{opacity:1;bottom:0}80%{opacity:1;bottom:0}100%{opacity:0;bottom:-70px;visibility:hidden}}
  @-webkit-keyframes slideinwards{0%{opacity:0}20%{opacity:1;bottom:0}50%{opacity:1;bottom:0}80%{opacity:1;bottom:0}100%{opacity:0;bottom:-70px;visibility:hidden}}
  .darkMode .tNtf span{box-shadow:0 10px 40px rgba(0,0,0,.2)}
  &lt;/style&gt;
&lt;div class="tNtf" id="toastNotif"&gt;&lt;/div&gt; 
&lt;script&gt;/*&lt;![CDATA[*/ function copyC(e,t){var o=document.getElementById(e),n=document.getElementById(t),e=getSelection(),t=document.createRange();e.removeAllRanges(),t.selectNodeContents(n),e.addRange(t),document.execCommand("copy"),e.removeAllRanges(),o.classList.add("copied"),document.getElementById("toastNotif").innerHTML="&lt;span&gt;Copied to Clipboard!&lt;/span&gt;",setTimeout(()=&gt;{o.classList.remove("copied")},3e3)} /*]]&gt;*/&lt;/script&gt;
&lt;p&gt;In this code, we have a while loop with the condition True. Since the condition will always evaluate to True, the loop will continue to run indefinitely. Within the loop, we have a single statement that prints out the message "This is an infinite loop!".&lt;/p&gt;&lt;p&gt;Of course, an infinite loop like this is not very useful in most real-world programs, since it will cause the program to hang or crash. However, there are some cases where an infinite loop can be used deliberately, such as in server applications that need to continuously listen for incoming network connections. In those cases, the infinite loop is typically combined with some other mechanism for gracefully shutting down the program, such as a signal handler or a separate control thread.&lt;/p&gt;&lt;p&gt;It's important to use infinite loops with caution since they can consume a lot of system resources and lead to unintended behaviour. If you do need to use an infinite loop, be sure to test your code thoroughly and monitor its performance closely.&lt;/p&gt;&lt;h2&gt;Let's go back to loops&lt;/h2&gt;&lt;p&gt;So, let's get down to the nitty-gritty of writing a Python program for a loop. Here is a simple case of a for loop that prints the figures from 1 to 10: &lt;/p&gt;&lt;!--[ Code Box 1 ]--&gt;
  &lt;div class="K2_CBox"&gt;
    &lt;div class="CB_Heading"&gt;&lt;br /&gt;&lt;button class="C_box_main" id="copy1" onclick="copyC('copy1','code1')"&gt;
        &lt;i class="CBox_icn"&gt;&lt;/i&gt;
      &lt;/button&gt;
    &lt;/div&gt;

    &lt;!--Add Your Parse HTML code Here--&gt;
    &lt;div id="code1"&gt;
      &lt;pre&gt;for i in range(1, 11):
    print(i)
&lt;/pre&gt;
    &lt;/div&gt;
  &lt;/div&gt;
&lt;style&gt;
  .K2_CBox{position:relative;background:#fff;width:100%;border-radius:6px;box-shadow: rgba(0, 0, 0, 0.15) 1.95px 1.95px 2.6px;padding:10px;margin:30px 0 30px}
  .K2_CBox .CB_Heading{display:flex;justify-content:space-between;align-items:center;margin-bottom:15px}
  .K2_CBox .CB_Heading span{margin:0;font-weight:700;font-family:inherit;font-size:1.1rem}
  .K2_CBox .C_box_main{cursor:pointer;display:inline-flex;align-items:center;padding:12px;outline:0;border:0;border-radius:50%;background:#004cbd;transition:all .3s ease;-webkit-transition:all .3s ease}.K2_CBox .C_box_main:hover{opacity:.8}.K2_CBox .C_box_main .CBox_icn{flex-shrink:0;display:inline-block;width:18px;height:18px;background-image:url("data:image/svg+xml,&lt;svg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='%23fefefe' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' viewBox='0 0 24 24'&gt;&lt;rect x='5.54615' y='5.54615' width='16.45385' height='16.45385' rx='4'/&gt;&lt;path d='M171.33311,181.3216v-8.45385a4,4,0,0,1,4-4H183.787' transform='translate(-169.33311 -166.86775)'/&gt;&lt;/svg&gt;");background-size:cover;background-repeat:no-repeat;background-position:center}
  .K2_CBox .C_box_main.copied{background:#2dcda7}
  .K2_CBox .C_box_main.copied .CBox_icn{background-image:url("data:image/svg+xml,&lt;svg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='%23fefefe' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' viewBox='0 0 24 24'&gt;&lt;path d='M22 11.07V12a10 10 0 1 1-5.93-9.14'/&gt;&lt;polyline points='23 3 12 14 9 11'/&gt;&lt;/svg&gt;")}
  .K2_CBox pre{margin:0;background:#f6f6f6;padding:15px;border-radius:5px;color:#08102b;font-size:.8rem;font-family:monospace;overflow:scroll;scroll-behavior:smooth;scroll-snap-type:x mandatory;-ms-overflow-style:none;-webkit-overflow-scrolling:touch; white-space: pre-wrap;}
  .K2_CBox pre::before, .K2_CBox pre::after{content:''}
  .dark-Mode .K2_CBox{background:#2d2d30}.dark-Mode .K2_CBox pre{background:#252526;color:#fffdfc}
  .tNtf span{position:fixed;left:24px;bottom:-70px;display:inline-flex;align-items:center;text-align:center;justify-content:center;margin-bottom:20px;z-index:99981;background:#323232;color:rgba(255,255,255,.8);font-size:14px;font-family:inherit;border-radius:3px;padding:13px 24px; box-shadow:0 5px 35px rgba(149,157,165,.3);opacity:0;transition:all .1s ease;animation:slideinwards 2s ease forwards;-webkit-animation:slideinwards 2s ease forwards}
  @media screen and (max-width:500px){.tNtf span{margin-bottom:20px;left:20px;right:20px;font-size:13px}}
  @keyframes slideinwards{0%{opacity:0}20%{opacity:1;bottom:0}50%{opacity:1;bottom:0}80%{opacity:1;bottom:0}100%{opacity:0;bottom:-70px;visibility:hidden}}
  @-webkit-keyframes slideinwards{0%{opacity:0}20%{opacity:1;bottom:0}50%{opacity:1;bottom:0}80%{opacity:1;bottom:0}100%{opacity:0;bottom:-70px;visibility:hidden}}
  .darkMode .tNtf span{box-shadow:0 10px 40px rgba(0,0,0,.2)}
  &lt;/style&gt;
&lt;div class="tNtf" id="toastNotif"&gt;&lt;/div&gt; 
&lt;script&gt;/*&lt;![CDATA[*/ function copyC(e,t){var o=document.getElementById(e),n=document.getElementById(t),e=getSelection(),t=document.createRange();e.removeAllRanges(),t.selectNodeContents(n),e.addRange(t),document.execCommand("copy"),e.removeAllRanges(),o.classList.add("copied"),document.getElementById("toastNotif").innerHTML="&lt;span&gt;Copied to Clipboard!&lt;/span&gt;",setTimeout(()=&gt;{o.classList.remove("copied")},3e3)} /*]]&gt;*/&lt;/script&gt;
&lt;p&gt;In this law, the range function creates a sequence of figures from 1 to 10, and the for loop iterates through each number in the sequence and prints it to the press.&amp;nbsp; &amp;nbsp;&lt;/p&gt;&lt;h2 style="text-align: left;"&gt;Nested Loops?&lt;/h2&gt;&lt;p&gt;But wait, there is further! Loops can also be nested, meaning you can put one loop inside another loop. It's like Russian nesting dolls, but with code.&amp;nbsp;&lt;/p&gt;&lt;p&gt;Here's an example of a Python nested loop:&lt;/p&gt;&lt;!--[ Code Box 1 ]--&gt;
  &lt;div class="K2_CBox"&gt;
    &lt;div class="CB_Heading"&gt;&amp;nbsp;&lt;button class="C_box_main" id="copy1" onclick="copyC('copy1','code1')"&gt;
        &lt;i class="CBox_icn"&gt;&lt;/i&gt;
      &lt;/button&gt;
    &lt;/div&gt;

    &lt;!--Add Your Parse HTML code Here--&gt;
    &lt;div id="code1"&gt;
      &lt;pre&gt;for i in range(1, 6):
    for j in range(1, i+1):
        print(j, end=" ")
    print()&lt;/pre&gt;
    &lt;/div&gt;
  &lt;/div&gt;
&lt;style&gt;
  .K2_CBox{position:relative;background:#fff;width:100%;border-radius:6px;box-shadow: rgba(0, 0, 0, 0.15) 1.95px 1.95px 2.6px;padding:10px;margin:30px 0 30px}
  .K2_CBox .CB_Heading{display:flex;justify-content:space-between;align-items:center;margin-bottom:15px}
  .K2_CBox .CB_Heading span{margin:0;font-weight:700;font-family:inherit;font-size:1.1rem}
  .K2_CBox .C_box_main{cursor:pointer;display:inline-flex;align-items:center;padding:12px;outline:0;border:0;border-radius:50%;background:#004cbd;transition:all .3s ease;-webkit-transition:all .3s ease}.K2_CBox .C_box_main:hover{opacity:.8}.K2_CBox .C_box_main .CBox_icn{flex-shrink:0;display:inline-block;width:18px;height:18px;background-image:url("data:image/svg+xml,&lt;svg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='%23fefefe' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' viewBox='0 0 24 24'&gt;&lt;rect x='5.54615' y='5.54615' width='16.45385' height='16.45385' rx='4'/&gt;&lt;path d='M171.33311,181.3216v-8.45385a4,4,0,0,1,4-4H183.787' transform='translate(-169.33311 -166.86775)'/&gt;&lt;/svg&gt;");background-size:cover;background-repeat:no-repeat;background-position:center}
  .K2_CBox .C_box_main.copied{background:#2dcda7}
  .K2_CBox .C_box_main.copied .CBox_icn{background-image:url("data:image/svg+xml,&lt;svg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='%23fefefe' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' viewBox='0 0 24 24'&gt;&lt;path d='M22 11.07V12a10 10 0 1 1-5.93-9.14'/&gt;&lt;polyline points='23 3 12 14 9 11'/&gt;&lt;/svg&gt;")}
  .K2_CBox pre{margin:0;background:#f6f6f6;padding:15px;border-radius:5px;color:#08102b;font-size:.8rem;font-family:monospace;overflow:scroll;scroll-behavior:smooth;scroll-snap-type:x mandatory;-ms-overflow-style:none;-webkit-overflow-scrolling:touch; white-space: pre-wrap;}
  .K2_CBox pre::before, .K2_CBox pre::after{content:''}
  .dark-Mode .K2_CBox{background:#2d2d30}.dark-Mode .K2_CBox pre{background:#252526;color:#fffdfc}
  .tNtf span{position:fixed;left:24px;bottom:-70px;display:inline-flex;align-items:center;text-align:center;justify-content:center;margin-bottom:20px;z-index:99981;background:#323232;color:rgba(255,255,255,.8);font-size:14px;font-family:inherit;border-radius:3px;padding:13px 24px; box-shadow:0 5px 35px rgba(149,157,165,.3);opacity:0;transition:all .1s ease;animation:slideinwards 2s ease forwards;-webkit-animation:slideinwards 2s ease forwards}
  @media screen and (max-width:500px){.tNtf span{margin-bottom:20px;left:20px;right:20px;font-size:13px}}
  @keyframes slideinwards{0%{opacity:0}20%{opacity:1;bottom:0}50%{opacity:1;bottom:0}80%{opacity:1;bottom:0}100%{opacity:0;bottom:-70px;visibility:hidden}}
  @-webkit-keyframes slideinwards{0%{opacity:0}20%{opacity:1;bottom:0}50%{opacity:1;bottom:0}80%{opacity:1;bottom:0}100%{opacity:0;bottom:-70px;visibility:hidden}}
  .darkMode .tNtf span{box-shadow:0 10px 40px rgba(0,0,0,.2)}
  &lt;/style&gt;
&lt;div class="tNtf" id="toastNotif"&gt;&lt;/div&gt; 
&lt;script&gt;/*&lt;![CDATA[*/ function copyC(e,t){var o=document.getElementById(e),n=document.getElementById(t),e=getSelection(),t=document.createRange();e.removeAllRanges(),t.selectNodeContents(n),e.addRange(t),document.execCommand("copy"),e.removeAllRanges(),o.classList.add("copied"),document.getElementById("toastNotif").innerHTML="&lt;span&gt;Copied to Clipboard!&lt;/span&gt;",setTimeout(()=&gt;{o.classList.remove("copied")},3e3)} /*]]&gt;*/&lt;/script&gt;
&lt;p&gt;There are two for loops in this code. While the inner loop iterates over the range of integers from 1 to the current value of i the outer loop iterates over the range of numbers from 1 to 5.&lt;/p&gt;&lt;p&gt;We print the value of j, followed by a space character (provided by the end=" " parameter in the print() method), on each iteration of the inner loop. The print() command with no arguments specifies the newline character, which transfers the output to the next line when the inner loop has finished iterating for the current value of i.&lt;/p&gt;&lt;p&gt;This code's output would be:&amp;nbsp;&lt;/p&gt;&lt;div class="K2_CBox"&gt;&lt;div class="CB_Heading"&gt;&lt;button class="C_box_main" id="copy1" onclick="copyC('copy1','code1')"&gt;
        &lt;i class="CBox_icn"&gt;&lt;/i&gt;
      &lt;/button&gt;
    &lt;/div&gt;

    &lt;!--Add Your Parse HTML code Here--&gt;
    &lt;div id="code1"&gt;
      &lt;pre&gt;1 
1 2 
1 2 3 
1 2 3 4 
1 2 3 4 5&lt;/pre&gt;
    &lt;/div&gt;
  &lt;/div&gt;
&lt;style&gt;
  .K2_CBox{position:relative;background:#fff;width:100%;border-radius:6px;box-shadow: rgba(0, 0, 0, 0.15) 1.95px 1.95px 2.6px;padding:10px;margin:30px 0 30px}
  .K2_CBox .CB_Heading{display:flex;justify-content:space-between;align-items:center;margin-bottom:15px}
  .K2_CBox .CB_Heading span{margin:0;font-weight:700;font-family:inherit;font-size:1.1rem}
  .K2_CBox .C_box_main{cursor:pointer;display:inline-flex;align-items:center;padding:12px;outline:0;border:0;border-radius:50%;background:#004cbd;transition:all .3s ease;-webkit-transition:all .3s ease}.K2_CBox .C_box_main:hover{opacity:.8}.K2_CBox .C_box_main .CBox_icn{flex-shrink:0;display:inline-block;width:18px;height:18px;background-image:url("data:image/svg+xml,&lt;svg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='%23fefefe' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' viewBox='0 0 24 24'&gt;&lt;rect x='5.54615' y='5.54615' width='16.45385' height='16.45385' rx='4'/&gt;&lt;path d='M171.33311,181.3216v-8.45385a4,4,0,0,1,4-4H183.787' transform='translate(-169.33311 -166.86775)'/&gt;&lt;/svg&gt;");background-size:cover;background-repeat:no-repeat;background-position:center}
  .K2_CBox .C_box_main.copied{background:#2dcda7}
  .K2_CBox .C_box_main.copied .CBox_icn{background-image:url("data:image/svg+xml,&lt;svg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='%23fefefe' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' viewBox='0 0 24 24'&gt;&lt;path d='M22 11.07V12a10 10 0 1 1-5.93-9.14'/&gt;&lt;polyline points='23 3 12 14 9 11'/&gt;&lt;/svg&gt;")}
  .K2_CBox pre{margin:0;background:#f6f6f6;padding:15px;border-radius:5px;color:#08102b;font-size:.8rem;font-family:monospace;overflow:scroll;scroll-behavior:smooth;scroll-snap-type:x mandatory;-ms-overflow-style:none;-webkit-overflow-scrolling:touch; white-space: pre-wrap;}
  .K2_CBox pre::before, .K2_CBox pre::after{content:''}
  .dark-Mode .K2_CBox{background:#2d2d30}.dark-Mode .K2_CBox pre{background:#252526;color:#fffdfc}
  .tNtf span{position:fixed;left:24px;bottom:-70px;display:inline-flex;align-items:center;text-align:center;justify-content:center;margin-bottom:20px;z-index:99981;background:#323232;color:rgba(255,255,255,.8);font-size:14px;font-family:inherit;border-radius:3px;padding:13px 24px; box-shadow:0 5px 35px rgba(149,157,165,.3);opacity:0;transition:all .1s ease;animation:slideinwards 2s ease forwards;-webkit-animation:slideinwards 2s ease forwards}
  @media screen and (max-width:500px){.tNtf span{margin-bottom:20px;left:20px;right:20px;font-size:13px}}
  @keyframes slideinwards{0%{opacity:0}20%{opacity:1;bottom:0}50%{opacity:1;bottom:0}80%{opacity:1;bottom:0}100%{opacity:0;bottom:-70px;visibility:hidden}}
  @-webkit-keyframes slideinwards{0%{opacity:0}20%{opacity:1;bottom:0}50%{opacity:1;bottom:0}80%{opacity:1;bottom:0}100%{opacity:0;bottom:-70px;visibility:hidden}}
  .darkMode .tNtf span{box-shadow:0 10px 40px rgba(0,0,0,.2)}
  &lt;/style&gt;
&lt;div class="tNtf" id="toastNotif"&gt;&lt;/div&gt; 
&lt;script&gt;/*&lt;![CDATA[*/ function copyC(e,t){var o=document.getElementById(e),n=document.getElementById(t),e=getSelection(),t=document.createRange();e.removeAllRanges(),t.selectNodeContents(n),e.addRange(t),document.execCommand("copy"),e.removeAllRanges(),o.classList.add("copied"),document.getElementById("toastNotif").innerHTML="&lt;span&gt;Copied to Clipboard!&lt;/span&gt;",setTimeout(()=&gt;{o.classList.remove("copied")},3e3)} /*]]&gt;*/&lt;/script&gt;
&lt;h2 style="text-align: left;"&gt;Conclusion&lt;/h2&gt;&lt;p&gt;Still, be advised nested loops can quickly become confusing if you are not careful. It's easy to lose track of which loop you are currently in and what your code is doing.&amp;nbsp; &amp;nbsp;&lt;/p&gt;&lt;p&gt;In conclusion, loops are an important tool in Python programming. They can help you automate repetitious tasks, reiterate through sequences of particulars, and even answer complex problems. But like any tool, loops must be used wisely. With a little practice and some patience, you will soon be writing loops like a pro. Happy coding!&lt;/p&gt;&lt;p class="MsoNormal" style="line-height: 115%; margin-bottom: 10pt; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span lang="EN"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;</description><link>https://scriptsquad.blogspot.com/2023/02/python-program-for-loops.html</link><author>noreply@blogger.com (Pranav Mohan)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjRlyzs-EPyW7SZe7RsGIgoqA4PYcSoyd2cauZHYt3S0nqoauzmtQMVHrON_buUhVZRjvzOqD_7PsW0Wh39E9gfTW8GdZy8p50Hv3__sXOCBU-2J7xT5ldl7DaL31kg7532PWNtANqom2273L3NKivhfXMj_o8q9-lnl6KXZ3ZyTeu1FlJkPc6dtGF6/s72-w640-h626-c/web-development-gbf5b30b91_1280.png" width="72"/><thr:total>0</thr:total><georss:featurename>India</georss:featurename><georss:point>20.593684 78.96288</georss:point><georss:box>-7.7165498361788458 43.80663 48.903917836178849 114.11913</georss:box></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2277500076249553811.post-1492148556692026440</guid><pubDate>Sat, 25 Feb 2023 15:17:00 +0000</pubDate><atom:updated>2023-02-26T05:48:42.112-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Java</category><title>Cracking the Code: Writing a Java Program to Find Prime Numbers</title><description>&lt;!--[ Code Box 1 ]--&gt;
  &lt;div class="K2_CBox"&gt;
    &lt;div class="CB_Heading"&gt;&lt;span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;h2 style="text-align: left;"&gt;&lt;span&gt;Cracking the Code: Writing a Java Program to Find Prime Numbers&lt;/span&gt;&lt;/h2&gt;&lt;div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhT1MmIwJVikhNe2hLnZ66P7eT_60Qzy0SQq6dp_wn_gaRKmldf3XpFXE_rgQkiP5NpJQyxg_ZIM21O-TmPxc5jOG5dDyf39HpuEktf7BcD4O8NVdPcC86RD8apgG9A0vEzZjNsAPWefj_LDqUKkhtzrwOVns476bmKgR3g0fnswLD02qh6SDlWmFXF/s484/java.webp" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img alt="Java is very easy to learn." border="0" data-original-height="358" data-original-width="484" height="516" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhT1MmIwJVikhNe2hLnZ66P7eT_60Qzy0SQq6dp_wn_gaRKmldf3XpFXE_rgQkiP5NpJQyxg_ZIM21O-TmPxc5jOG5dDyf39HpuEktf7BcD4O8NVdPcC86RD8apgG9A0vEzZjNsAPWefj_LDqUKkhtzrwOVns476bmKgR3g0fnswLD02qh6SDlWmFXF/w697-h516/java.webp" title="Java" width="697" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;h2 style="text-align: left;"&gt;&lt;span style="font-weight: normal;"&gt;Need help with your Java Assignment?&amp;nbsp;&lt;/span&gt;&lt;/h2&gt;&lt;h2 style="text-align: left;"&gt;&lt;span style="font-weight: normal;"&gt;Here's a &lt;/span&gt;&lt;span&gt;Java Program on Prime Numbers.&lt;/span&gt;&lt;/h2&gt;&lt;h3&gt;Let's face it - prime numbers get all the attention in programming. They're the cool kids on the block, with their unique properties and complex algorithms. But what about even numbers? They may not be as flashy, but they have their own charm. After all, without even numbers, we wouldn't have pairs, symmetry, or... well, much of anything!&lt;/h3&gt;&lt;h3&gt;&lt;br /&gt;&lt;/h3&gt;&lt;h3&gt;But don't worry, dear even numbers, we haven't forgotten about you. Today, we're going to talk about how to identify prime numbers in Java programming. And don't worry, we'll sprinkle in a bit of love for even numbers along the way.&lt;/h3&gt;&lt;h3&gt;&lt;br /&gt;&lt;/h3&gt;&lt;h3&gt;So, what is a prime number, you ask? It's a number that is only divisible by 1 and itself. Simple enough, right? But why are prime numbers so special? Well, for one, they can't be broken down into simpler components. They're like the building blocks of numbers - you can't go any lower.&lt;/h3&gt;&lt;h3&gt;&lt;br /&gt;&lt;/h3&gt;&lt;h3&gt;But what about even numbers? They may not be prime, but they have their own quirks. For example, every even number can be represented as the sum of two prime numbers. See, even numbers are like the perfect wingmen - always helping out their prime buddies!&lt;/h3&gt;&lt;h3&gt;&lt;br /&gt;&lt;/h3&gt;&lt;h3&gt;But I digress. Let's get back to Java programming. To check if a number is prime, we need to divide it by every number between 2 and the number itself. If it's only divisible by 1 and itself, then it's prime. If it's divisible by any other number, then it's not prime.&lt;/h3&gt;&lt;h3&gt;&lt;br /&gt;&lt;/h3&gt;&lt;h3&gt;&lt;span&gt;&lt;/span&gt;&lt;/h3&gt;&lt;h3&gt;Here's a Java program to check if a number is prime:&lt;/h3&gt;&lt;div class="CB_Heading"&gt;&lt;span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="CB_Heading"&gt;
      &lt;span&gt;HTML&lt;/span&gt;
      &lt;button class="C_box_main" id="copy1" onclick="copyC('copy1','code1')"&gt;
        &lt;i class="CBox_icn"&gt;&lt;/i&gt;
      &lt;/button&gt;
    &lt;/div&gt;

    &lt;!--Add Your Parse HTML code Here--&gt;
    &lt;div id="code1"&gt;
      &lt;pre&gt; import java.util.Scanner;

public class PrimeNumberChecker {
   public static void main(String[] args) {
       int num;
       boolean isPrime = true;
       Scanner input = new Scanner(System.in);
       System.out.println("Enter a number: ");
       num = input.nextInt();
       for (int i = 2; i &amp;lt;= num / 2; i++) {
           if (num % i == 0) {
               isPrime = false;
               break;
           }
       }
       if (isPrime) {
           System.out.println(num + " is a prime number!");
       } else {
           System.out.println(num + " is not a prime number!");
       }
   }
}&lt;/pre&gt;&lt;h4&gt;As you can see, we're dividing the input number by every number between 2 and half the number itself. If the number is divisible by any of those numbers, then it's not prime. And if it's not divisible by any of them, then it's prime!&lt;/h4&gt;&lt;h4&gt;&lt;br /&gt;&lt;/h4&gt;&lt;h4&gt;But remember even numbers. They may not be prime, but they're still important. Plus, they make great partners for prime numbers. So next time you're working with prime numbers in Java programming, give a little love to even numbers too. After all, they deserve it!&lt;/h4&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h2 style="text-align: left;"&gt;Lo and behold! You just learnt how to make a program on Java!&lt;/h2&gt;&lt;h3 style="text-align: left;"&gt;&lt;br /&gt;&lt;/h3&gt;&lt;h3 style="text-align: left;"&gt;A bit of humour can make learning interesting.&lt;/h3&gt;&lt;h2 style="text-align: left;"&gt;&lt;br /&gt;&lt;/h2&gt;&lt;h2 style="text-align: left;"&gt;Did you find this article helpful? Feel free to give your feedback and help us to improve our content.&lt;/h2&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
     
&lt;style&gt;
  .K2_CBox{position:relative;background:#fff;width:100%;border-radius:6px;box-shadow: rgba(0, 0, 0, 0.15) 1.95px 1.95px 2.6px;padding:10px;margin:30px 0 30px}
  .K2_CBox .CB_Heading{display:flex;justify-content:space-between;align-items:center;margin-bottom:15px}
  .K2_CBox .CB_Heading span{margin:0;font-weight:700;font-family:inherit;font-size:1.1rem}
  .K2_CBox .C_box_main{cursor:pointer;display:inline-flex;align-items:center;padding:12px;outline:0;border:0;border-radius:50%;background:#004cbd;transition:all .3s ease;-webkit-transition:all .3s ease}.K2_CBox .C_box_main:hover{opacity:.8}.K2_CBox .C_box_main .CBox_icn{flex-shrink:0;display:inline-block;width:18px;height:18px;background-image:url("data:image/svg+xml,&lt;svg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='%23fefefe' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' viewBox='0 0 24 24'&gt;&lt;rect x='5.54615' y='5.54615' width='16.45385' height='16.45385' rx='4'/&gt;&lt;path d='M171.33311,181.3216v-8.45385a4,4,0,0,1,4-4H183.787' transform='translate(-169.33311 -166.86775)'/&gt;&lt;/svg&gt;");background-size:cover;background-repeat:no-repeat;background-position:center}
  .K2_CBox .C_box_main.copied{background:#2dcda7}
  .K2_CBox .C_box_main.copied .CBox_icn{background-image:url("data:image/svg+xml,&lt;svg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='%23fefefe' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' viewBox='0 0 24 24'&gt;&lt;path d='M22 11.07V12a10 10 0 1 1-5.93-9.14'/&gt;&lt;polyline points='23 3 12 14 9 11'/&gt;&lt;/svg&gt;")}
  .K2_CBox pre{margin:0;background:#f6f6f6;padding:15px;border-radius:5px;color:#08102b;font-size:.8rem;font-family:monospace;overflow:scroll;scroll-behavior:smooth;scroll-snap-type:x mandatory;-ms-overflow-style:none;-webkit-overflow-scrolling:touch; white-space: pre-wrap;}
  .K2_CBox pre::before, .K2_CBox pre::after{content:''}
  .dark-Mode .K2_CBox{background:#2d2d30}.dark-Mode .K2_CBox pre{background:#252526;color:#fffdfc}
  .tNtf span{position:fixed;left:24px;bottom:-70px;display:inline-flex;align-items:center;text-align:center;justify-content:center;margin-bottom:20px;z-index:99981;background:#323232;color:rgba(255,255,255,.8);font-size:14px;font-family:inherit;border-radius:3px;padding:13px 24px; box-shadow:0 5px 35px rgba(149,157,165,.3);opacity:0;transition:all .1s ease;animation:slideinwards 2s ease forwards;-webkit-animation:slideinwards 2s ease forwards}
  @media screen and (max-width:500px){.tNtf span{margin-bottom:20px;left:20px;right:20px;font-size:13px}}
  @keyframes slideinwards{0%{opacity:0}20%{opacity:1;bottom:0}50%{opacity:1;bottom:0}80%{opacity:1;bottom:0}100%{opacity:0;bottom:-70px;visibility:hidden}}
  @-webkit-keyframes slideinwards{0%{opacity:0}20%{opacity:1;bottom:0}50%{opacity:1;bottom:0}80%{opacity:1;bottom:0}100%{opacity:0;bottom:-70px;visibility:hidden}}
  .darkMode .tNtf span{box-shadow:0 10px 40px rgba(0,0,0,.2)}
  &lt;/style&gt;
&lt;div class="tNtf" id="toastNotif"&gt;&lt;/div&gt; 
&lt;script&gt;/*&lt;![CDATA[*/ function copyC(e,t){var o=document.getElementById(e),n=document.getElementById(t),e=getSelection(),t=document.createRange();e.removeAllRanges(),t.selectNodeContents(n),e.addRange(t),document.execCommand("copy"),e.removeAllRanges(),o.classList.add("copied"),document.getElementById("toastNotif").innerHTML="&lt;span&gt;Copied to Clipboard!&lt;/span&gt;",setTimeout(()=&gt;{o.classList.remove("copied")},3e3)} /*]]&gt;*/&lt;/script&gt;
    &lt;/div&gt;
  &lt;/div&gt;</description><link>https://scriptsquad.blogspot.com/2023/02/java-program-for-prime-numbers.html</link><author>noreply@blogger.com (Pranav Mohan)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhT1MmIwJVikhNe2hLnZ66P7eT_60Qzy0SQq6dp_wn_gaRKmldf3XpFXE_rgQkiP5NpJQyxg_ZIM21O-TmPxc5jOG5dDyf39HpuEktf7BcD4O8NVdPcC86RD8apgG9A0vEzZjNsAPWefj_LDqUKkhtzrwOVns476bmKgR3g0fnswLD02qh6SDlWmFXF/s72-w697-h516-c/java.webp" width="72"/><thr:total>0</thr:total><georss:featurename>Lucknow, Uttar Pradesh, India</georss:featurename><georss:point>26.8466937 80.946165999999991</georss:point><georss:box>-1.463540136178846 45.789915999999991 55.156927536178841 116.10241599999999</georss:box></item></channel></rss>