<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>arraylist java - Wikitechy</title>
	<atom:link href="https://www.wikitechy.com/interview-questions/tag/arraylist-java/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.wikitechy.com/interview-questions/tag/arraylist-java/</link>
	<description>Interview Questions</description>
	<lastBuildDate>Sat, 11 Sep 2021 11:45:44 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>

<image>
	<url>https://www.wikitechy.com/interview-questions/wp-content/uploads/2025/10/cropped-wikitechy-icon-32x32.png</url>
	<title>arraylist java - Wikitechy</title>
	<link>https://www.wikitechy.com/interview-questions/tag/arraylist-java/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>How to optimally divide an array into two subarrays so that sum of elements in both are same ?</title>
		<link>https://www.wikitechy.com/interview-questions/java/how-to-optimally-divide-an-array-into-two-subarrays-so-that-sum-of-elements-in-both-are-same/</link>
					<comments>https://www.wikitechy.com/interview-questions/java/how-to-optimally-divide-an-array-into-two-subarrays-so-that-sum-of-elements-in-both-are-same/#respond</comments>
		
		<dc:creator><![CDATA[Editor]]></dc:creator>
		<pubDate>Wed, 14 Jul 2021 00:03:02 +0000</pubDate>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[2d array java]]></category>
		<category><![CDATA[Accenture interview questions and answers]]></category>
		<category><![CDATA[addition program in java]]></category>
		<category><![CDATA[Applied Materials interview questions and answers]]></category>
		<category><![CDATA[array declaration]]></category>
		<category><![CDATA[array declaration in java]]></category>
		<category><![CDATA[array of objects in java]]></category>
		<category><![CDATA[array programs in java]]></category>
		<category><![CDATA[arraylist java]]></category>
		<category><![CDATA[Atos interview questions and answers]]></category>
		<category><![CDATA[Capgemini interview questions and answers]]></category>
		<category><![CDATA[CASTING NETWORKS INDIA PVT LIMITED interview questions and answers]]></category>
		<category><![CDATA[CGI Group Inc interview questions and answers]]></category>
		<category><![CDATA[Chetu interview questions and answers]]></category>
		<category><![CDATA[Ciena Corporation interview questions and answers]]></category>
		<category><![CDATA[Collabera Technologies interview questions and answers]]></category>
		<category><![CDATA[Dell International Services India Pvt Ltd interview questions and answers]]></category>
		<category><![CDATA[FIS Global Business Solutions India Pvt Ltd interview questions and answers]]></category>
		<category><![CDATA[Flipkart interview questions and answers]]></category>
		<category><![CDATA[for each loop java]]></category>
		<category><![CDATA[IBM interview questions and answers]]></category>
		<category><![CDATA[Indecomm Global Services interview questions and answers]]></category>
		<category><![CDATA[Infosys Technologies interview questions and answers]]></category>
		<category><![CDATA[java 8 reduce]]></category>
		<category><![CDATA[java add to array]]></category>
		<category><![CDATA[java array]]></category>
		<category><![CDATA[java array class]]></category>
		<category><![CDATA[java array example]]></category>
		<category><![CDATA[java array length]]></category>
		<category><![CDATA[java array methods]]></category>
		<category><![CDATA[java foreach array]]></category>
		<category><![CDATA[java initialize array]]></category>
		<category><![CDATA[java print array]]></category>
		<category><![CDATA[java sort array]]></category>
		<category><![CDATA[java stream sum]]></category>
		<category><![CDATA[L&T Infotech interview questions and answers]]></category>
		<category><![CDATA[Mphasis interview questions and answers]]></category>
		<category><![CDATA[NetApp interview questions and answers]]></category>
		<category><![CDATA[Oracle Corporation interview questions and answers]]></category>
		<category><![CDATA[PeopleStrong interview questions and answers]]></category>
		<category><![CDATA[Persistent Systems interview questions and answers]]></category>
		<category><![CDATA[RBS India De interview questions and answers]]></category>
		<category><![CDATA[Reliance Industries Ltd interview questions and answers]]></category>
		<category><![CDATA[remaxys infotech interview questions and answers]]></category>
		<category><![CDATA[SAP Labs India Pvt Ltd interview questions and answers]]></category>
		<category><![CDATA[split array where sum of left hand side is equal to sum of right hand side]]></category>
		<category><![CDATA[Tech Mahindra interview questions and answers]]></category>
		<category><![CDATA[UnitedHealth Group interview questions and answers]]></category>
		<category><![CDATA[Virtusa Consulting Services Pvt Ltd interview questions and answers]]></category>
		<category><![CDATA[Wells Fargo interview questions and answers]]></category>
		<category><![CDATA[Wipro Infotech interview questions and answers]]></category>
		<guid isPermaLink="false">https://www.wikitechy.com/interview-questions/?p=663</guid>

					<description><![CDATA[Answer : Given an array of integers greater than zero...]]></description>
										<content:encoded><![CDATA[<div class="TextHeading">
<div class="hddn">
<h2 id="how-to-optimally-divide-an-array-into-two-subarrays-so-that-sum-of-elements-in-both-are-same" class="color-pink" style="text-align: justify;">How to optimally divide an array into two subarrays so that sum of elements in both are same ?</h2>
<p style="text-align: justify;">There are two methods used to <a href="https://www.wikitechy.com/tutorials/java/how-to-split-string-into-array-in-java" target="_blank" rel="noopener">split arrays</a>,</p>
</div>
</div>
<div class="Content" style="text-align: justify;">
<div class="hddn">
<ul>
<li>Given an array of integers greater than zero, find if it is possible to split it in two subarrays (without reordering the elements), such that the sum of the two subarrays is the same. For example,</li>
</ul>
</div>
</div>
<div class="Output" style="text-align: justify;">
<div class="hddn">
<figure class="highlight">
<pre><code class="hljs" data-lang=""><span class="nt">Input : Arr[] = { 1 , 2 , 3 , 4 , 5 , 5  }
Output :  { 1 2 3 4 } 
          { 5 , 5 }
</span></code></pre>
</figure>
</div>
</div>
<div class="Content" style="text-align: justify;">
<div class="hddn">
<ul>
<li>Given an array of integers, find if it’s possible to remove exactly one integer from the array that divides the array into two subarrays with the same sum. For Example,</li>
</ul>
</div>
</div>
<div class="Output" style="text-align: justify;">
<div class="hddn">
<figure class="highlight">
<pre><code class="hljs bash" data-lang=""><span class="nt">                           Input:  arr = [<span class="hljs-number">6</span>, <span class="hljs-number">2</span>, <span class="hljs-number">3</span>, <span class="hljs-number">2</span>, <span class="hljs-number">1</span>]
                           Output:  <span class="hljs-literal">true</span>
</span></code></pre>
</figure>
</div>
</div>
<div class="Content" style="text-align: justify;">
<div class="hddn">
<ul>
<li>On removing element 2 at index 1, the array gets divided into two subarrays [6] and [3, 2, 1] having equal sum.</li>
</ul>
</div>
</div>
<div class="text-center row" style="text-align: justify;"></div>
<div class="TextHeading">
<div class="hddn">
<h2 id="sample-code-in-java" class="color-blue" style="text-align: justify;">Sample Code in Java</h2>
<div class="code-embed-wrapper"> <div class="code-embed-infos"> </div> <pre class="language-java code-embed-pre line-numbers"  data-start="1" data-line-offset="0"><code class="language-java code-embed-code">/ Java program to split an array <br/>// into two equal sum subarrays <br/>import java.io.*;<br/><br/>class Wikitechy {<br/><br/>    // Returns split point. If <br/>    // not possible, then return -1. <br/>    static int findSplitPoint(int arr[], int n) {<br/><br/>        int leftSum = 0;<br/><br/>        // traverse array element <br/>        for (int i = 0; i &lt; n; i++) {<br/>            // add current element to left Sum <br/>            leftSum += arr[i];<br/><br/>            // find sum of rest array <br/>            // elements (rightSum) <br/>            int rightSum = 0;<br/><br/>            for (int j = i + 1; j &lt; n; j++)<br/>                rightSum += arr[j];<br/><br/>            // split point index <br/>            if (leftSum == rightSum)<br/>                return i + 1;<br/>        }<br/><br/>        // if it is not possible to <br/>        // split array into two parts <br/>        return -1;<br/>    }<br/><br/>    // Prints two parts after finding <br/>    // split point using findSplitPoint() <br/>    static void printTwoParts(int arr[], int n) {<br/><br/>        int splitPoint = findSplitPoint(arr, n);<br/><br/>        if (splitPoint == -1 || splitPoint == n) {<br/>            System.out.println(&quot;Not Possible&quot;);<br/>            return;<br/>        }<br/><br/>        for (int i = 0; i &lt; n; i++) {<br/>            if (splitPoint == i)<br/>                System.out.println();<br/><br/>            System.out.print(arr[i] + &quot; &quot;);<br/><br/>        }<br/>    }<br/><br/>    // Driver program <br/><br/>    public static void main(String[] args) {<br/><br/>        int arr[] = {1,1,0,2};<br/>        int n = arr.length;<br/>        printTwoParts(arr, n);<br/><br/>    }<br/>}</code></pre> </div>
<div class="TextHeading" style="text-align: justify;">
<div class="hddn">
<h2 id="output" class="color-blue">Output</h2>
</div>
</div>
<div class="Output">
<div class="hddn">
<figure class="highlight" style="text-align: justify;">
<pre><code class="hljs" data-lang=""><span class="nt">1 1 
0 2</span></code></pre>
</figure>
</div>
</div>
</div>
</div>
]]></content:encoded>
					
					<wfw:commentRss>https://www.wikitechy.com/interview-questions/java/how-to-optimally-divide-an-array-into-two-subarrays-so-that-sum-of-elements-in-both-are-same/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>What is class/object diagram ?</title>
		<link>https://www.wikitechy.com/interview-questions/java/what-is-class-object-diagram/</link>
					<comments>https://www.wikitechy.com/interview-questions/java/what-is-class-object-diagram/#respond</comments>
		
		<dc:creator><![CDATA[Editor]]></dc:creator>
		<pubDate>Tue, 13 Jul 2021 23:06:29 +0000</pubDate>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Accenture interview questions and answers]]></category>
		<category><![CDATA[Applied Materials interview questions and answers]]></category>
		<category><![CDATA[arraylist java]]></category>
		<category><![CDATA[Atos interview questions and answers]]></category>
		<category><![CDATA[Capgemini interview questions and answers]]></category>
		<category><![CDATA[CASTING NETWORKS INDIA PVT LIMITED interview questions and answers]]></category>
		<category><![CDATA[CGI Group Inc interview questions and answers]]></category>
		<category><![CDATA[Chetu interview questions and answers]]></category>
		<category><![CDATA[Ciena Corporation interview questions and answers]]></category>
		<category><![CDATA[class and object]]></category>
		<category><![CDATA[class and object in java]]></category>
		<category><![CDATA[class to java]]></category>
		<category><![CDATA[Collabera Technologies interview questions and answers]]></category>
		<category><![CDATA[Dell International Services India Pvt Ltd interview questions and answers]]></category>
		<category><![CDATA[difference between class and object]]></category>
		<category><![CDATA[FIS Global Business Solutions India Pvt Ltd interview questions and answers]]></category>
		<category><![CDATA[Flipkart interview questions and answers]]></category>
		<category><![CDATA[IBM interview questions and answers]]></category>
		<category><![CDATA[Indecomm Global Services interview questions and answers]]></category>
		<category><![CDATA[Infosys Technologies interview questions and answers]]></category>
		<category><![CDATA[java class]]></category>
		<category><![CDATA[java class constructor]]></category>
		<category><![CDATA[java class diagram]]></category>
		<category><![CDATA[java class example]]></category>
		<category><![CDATA[java class method]]></category>
		<category><![CDATA[java create class]]></category>
		<category><![CDATA[java interview questions]]></category>
		<category><![CDATA[java programming questions]]></category>
		<category><![CDATA[java questions and answers]]></category>
		<category><![CDATA[L&T Infotech interview questions and answers]]></category>
		<category><![CDATA[Mphasis interview questions and answers]]></category>
		<category><![CDATA[NetApp interview questions and answers]]></category>
		<category><![CDATA[object class in java]]></category>
		<category><![CDATA[object creation in java]]></category>
		<category><![CDATA[Oracle Corporation interview questions and answers]]></category>
		<category><![CDATA[PeopleStrong interview questions and answers]]></category>
		<category><![CDATA[Persistent Systems interview questions and answers]]></category>
		<category><![CDATA[protected class java]]></category>
		<category><![CDATA[RBS India De interview questions and answers]]></category>
		<category><![CDATA[Reliance Industries Ltd interview questions and answers]]></category>
		<category><![CDATA[SAP Labs India Pvt Ltd interview questions and answers]]></category>
		<category><![CDATA[Tech Mahindra interview questions and answers]]></category>
		<category><![CDATA[types of classes in java]]></category>
		<category><![CDATA[UnitedHealth Group interview questions and answers]]></category>
		<category><![CDATA[Virtusa Consulting Services Pvt Ltd interview questions and answers]]></category>
		<category><![CDATA[Wells Fargo interview questions and answers]]></category>
		<category><![CDATA[Wipro Infotech interview questions and answers]]></category>
		<category><![CDATA[zycus infotech interview questions and answers]]></category>
		<guid isPermaLink="false">https://www.wikitechy.com/interview-questions/?p=614</guid>

					<description><![CDATA[Answer : A class is an entity that determines how an object...]]></description>
										<content:encoded><![CDATA[<div class="TextHeading">
<div class="hddn">
<h2 id="what-is-class-object-diagram" class="color-pink" style="text-align: justify;">What is class/object diagram ?</h2>
</div>
</div>
<div class="TextHeading" style="text-align: justify;">
<div class="hddn">
<h2 id="java-class" class="color-green">Java Class:</h2>
</div>
</div>
<div class="Content" style="text-align: justify;">
<div class="hddn">
<ul>
<li>A class is an entity that determines how an object will perform and what the object will contain.</li>
<li>In other words, it is a blueprint or a set of instruction to build a specific type of object.</li>
</ul>
</div>
</div>
<div class="ImageContent" style="text-align: justify;">
<div class="hddn"><img decoding="async" class="img-responsive center-block aligncenter" src="https://cdn.wikitechy.com/interview-questions/java/java-class-and-object.gif" alt=" Class and Object Diagram" /></div>
</div>
<div class="subheading" style="text-align: justify;">
<h2 id="syntax">Syntax:</h2>
</div>
<div class="CodeContent" style="text-align: justify;">
<div class="hddn">
<figure class="highlight"><div class="code-embed-wrapper"> <div class="code-embed-infos"> </div> <pre class="language-java code-embed-pre line-numbers"  data-start="1" data-line-offset="0"><code class="language-java code-embed-code">class ClassName {<br/>   // variables<br/>   // methods<br/>}</code></pre> </div></figure>
</div>
</div>
<div class="TextHeading" style="text-align: justify;">
<div class="hddn">
<h2 id="java-objects" class="color-green">Java Objects:</h2>
</div>
</div>
<div class="Content" style="text-align: justify;">
<div class="hddn">
<ul>
<li>When class is defined, only the condition for the object is defined.</li>
<li>No memory or storage is allocated.</li>
<li>To access members defined within the class, you need to create objects.</li>
</ul>
</div>
</div>
<div class="subheading" style="text-align: justify;">
<h2 id="syntax-2">Syntax:</h2>
</div>
<div class="CodeContent">
<div class="hddn">
<figure class="highlight" style="text-align: justify;">
<pre><code id="code2" class="hljs javascript" data-lang=""><span class="nt">ClassName ReferenceVariable = <span class="hljs-keyword">new</span> ClassName();</span></code></pre>
</figure>
</div>
</div>
]]></content:encoded>
					
					<wfw:commentRss>https://www.wikitechy.com/interview-questions/java/what-is-class-object-diagram/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
