<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-1892419234778073957</id><updated>2024-11-01T03:34:49.156-07:00</updated><title type='text'>JAVA PROGRAMMING</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://basicsjavaprogramming.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1892419234778073957/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://basicsjavaprogramming.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>ahsan</name><uri>http://www.blogger.com/profile/07285068415581581173</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>9</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-1892419234778073957.post-5335539192070489595</id><published>2011-06-21T12:41:00.000-07:00</published><updated>2011-06-21T12:41:06.738-07:00</updated><title type='text'>How to input From user in Java Programm ?????</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;you have to must know about the function.&lt;br /&gt;
&lt;br /&gt;
this function are built-ed function not user define function in java.&lt;br /&gt;
&lt;br /&gt;
first of all you have to include this function if you wanna take input from user&lt;br /&gt;
&lt;br /&gt;
import java.util.*;&lt;br /&gt;
and also we also need a scanner statement&lt;br /&gt;
&lt;br /&gt;
Scanner in= new Scanner(System.in);&lt;br /&gt;
and input get function are following&lt;br /&gt;
&lt;br /&gt;
for integer:&lt;br /&gt;
a=in.nextInt();&lt;br /&gt;
for float:&lt;br /&gt;
a=in.nextFloat();&lt;br /&gt;
for double:&lt;br /&gt;
a=in.nextDouble:&lt;br /&gt;
&lt;br /&gt;
for string :&lt;br /&gt;
&lt;br /&gt;
a=in.nextLint();&lt;br /&gt;
&lt;br /&gt;
for character you have add a main function to get input in character form&lt;br /&gt;
that&#39;s why we will discuss it later....&lt;br /&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://basicsjavaprogramming.blogspot.com/feeds/5335539192070489595/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://basicsjavaprogramming.blogspot.com/2011/06/how-to-input-from-user-in-java-programm.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1892419234778073957/posts/default/5335539192070489595'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1892419234778073957/posts/default/5335539192070489595'/><link rel='alternate' type='text/html' href='http://basicsjavaprogramming.blogspot.com/2011/06/how-to-input-from-user-in-java-programm.html' title='How to input From user in Java Programm ?????'/><author><name>ahsan</name><uri>http://www.blogger.com/profile/07285068415581581173</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1892419234778073957.post-2566246421376119897</id><published>2011-06-21T12:38:00.000-07:00</published><updated>2011-06-21T12:38:41.226-07:00</updated><title type='text'>How to Swap two values in java Program</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;class swp&lt;br /&gt;
{&lt;br /&gt;
public static void main (String arg[])&lt;br /&gt;
{&lt;br /&gt;
int x,y,z;&lt;br /&gt;
x=5;&lt;br /&gt;
y=10;&lt;br /&gt;
z=x;&lt;br /&gt;
x=y;&lt;br /&gt;
y=z;&lt;br /&gt;
System.out.print (&quot;X =  &quot;);&lt;br /&gt;
System.out.println ( x );&lt;br /&gt;
&lt;br /&gt;
System.out.print (&quot;Y =  &quot;);&lt;br /&gt;
System.out.println ( y );&lt;br /&gt;
&lt;br /&gt;
System.out.print(&quot;\n\n\t\tDeveloped by AhsAn....!!\n\n\n&quot;);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
}&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://basicsjavaprogramming.blogspot.com/feeds/2566246421376119897/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://basicsjavaprogramming.blogspot.com/2011/06/how-to-swap-two-values-in-java-program.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1892419234778073957/posts/default/2566246421376119897'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1892419234778073957/posts/default/2566246421376119897'/><link rel='alternate' type='text/html' href='http://basicsjavaprogramming.blogspot.com/2011/06/how-to-swap-two-values-in-java-program.html' title='How to Swap two values in java Program'/><author><name>ahsan</name><uri>http://www.blogger.com/profile/07285068415581581173</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1892419234778073957.post-6815857623093904609</id><published>2011-06-21T12:35:00.000-07:00</published><updated>2011-06-21T12:35:48.855-07:00</updated><title type='text'>The java Programm that read temperature in celsius and convert it into Foreign height</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;class changer&lt;br /&gt;
{&lt;br /&gt;
public static void main (String arg[])&lt;br /&gt;
{&lt;br /&gt;
double tC, tF;&lt;br /&gt;
/*tc is veritable of temperature in Celsius and tF is for temp in fahrenhite*/&lt;br /&gt;
&lt;br /&gt;
tC=50;&lt;br /&gt;
&lt;br /&gt;
tF=1.8*tC+32;&lt;br /&gt;
&lt;br /&gt;
System.out.print (&quot; Temperature in Fahrenhite is : &quot;);&lt;br /&gt;
System.out.println(tF);&lt;br /&gt;
System.out.println( &quot;\n\n\t\tDeveloped by AhsAn! &quot; );&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://basicsjavaprogramming.blogspot.com/feeds/6815857623093904609/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://basicsjavaprogramming.blogspot.com/2011/06/java-programm-that-read-temperature-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1892419234778073957/posts/default/6815857623093904609'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1892419234778073957/posts/default/6815857623093904609'/><link rel='alternate' type='text/html' href='http://basicsjavaprogramming.blogspot.com/2011/06/java-programm-that-read-temperature-in.html' title='The java Programm that read temperature in celsius and convert it into Foreign height'/><author><name>ahsan</name><uri>http://www.blogger.com/profile/07285068415581581173</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1892419234778073957.post-5763543498169089825</id><published>2011-06-21T12:30:00.000-07:00</published><updated>2011-06-21T12:30:08.383-07:00</updated><title type='text'>How to calculate Bill by predefine Value Java Program</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;class bill&lt;br /&gt;
{&lt;br /&gt;
public static void main (String arg[])&lt;br /&gt;
{&lt;br /&gt;
double pr,cr,un,ba;&lt;br /&gt;
&lt;br /&gt;
/*pr = previous reading , cr= current reading, un= consume units, ba= bill amount*/&lt;br /&gt;
pr=700;   &lt;br /&gt;
&lt;br /&gt;
cr=1500;&lt;br /&gt;
un= cr-pr;&lt;br /&gt;
&lt;br /&gt;
ba= 5*un;    /* 5 is rate per unit*/&lt;br /&gt;
&lt;br /&gt;
System.out.println (&quot;Your Consume Units is : &quot;+un);&lt;br /&gt;
&lt;br /&gt;
System.out.println (&quot;Your bill amount is : &quot;+ba);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
System.out.print(&quot;\n\n\t\tDeveloped by AhsAn....!!\n\n\n&quot;);&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;}&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://basicsjavaprogramming.blogspot.com/feeds/5763543498169089825/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://basicsjavaprogramming.blogspot.com/2011/06/how-to-calculate-bill-by-predefine.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1892419234778073957/posts/default/5763543498169089825'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1892419234778073957/posts/default/5763543498169089825'/><link rel='alternate' type='text/html' href='http://basicsjavaprogramming.blogspot.com/2011/06/how-to-calculate-bill-by-predefine.html' title='How to calculate Bill by predefine Value Java Program'/><author><name>ahsan</name><uri>http://www.blogger.com/profile/07285068415581581173</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1892419234778073957.post-1274834191150646024</id><published>2011-06-21T12:26:00.000-07:00</published><updated>2011-06-21T12:26:44.579-07:00</updated><title type='text'>How to Find  the volume of Cube In Java Program</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;class vol&lt;br /&gt;
{&lt;br /&gt;
public static void main (String arg[])&lt;br /&gt;
{&lt;br /&gt;
double v, r;&lt;br /&gt;
&lt;br /&gt;
r=4;&lt;br /&gt;
/* &#39;4 &#39; is pre- define value of of radius(r)*/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
v=4/3*(3.14*r*r*r);&lt;br /&gt;
System.out.println (&quot; volume of the sphere is :&quot;+v);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
System.out.print(&quot;\n\n\t\tDeveloped by AhsAn....!!\n\n\n&quot;);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
}&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://basicsjavaprogramming.blogspot.com/feeds/1274834191150646024/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://basicsjavaprogramming.blogspot.com/2011/06/how-to-find-volume-of-cube-in-java.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1892419234778073957/posts/default/1274834191150646024'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1892419234778073957/posts/default/1274834191150646024'/><link rel='alternate' type='text/html' href='http://basicsjavaprogramming.blogspot.com/2011/06/how-to-find-volume-of-cube-in-java.html' title='How to Find  the volume of Cube In Java Program'/><author><name>ahsan</name><uri>http://www.blogger.com/profile/07285068415581581173</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1892419234778073957.post-290418054916916848</id><published>2011-06-15T09:29:00.000-07:00</published><updated>2011-06-15T09:29:27.225-07:00</updated><title type='text'>How to Declare &amp;initialize the variable in simple java programm</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;class initialize&lt;br /&gt;
{public static void main (String arg[])&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp;int a;&amp;nbsp; //declare&lt;br /&gt;
&amp;nbsp;a=2; //initialize&lt;br /&gt;
int b=4;&amp;nbsp; //declare and initialize&lt;br /&gt;
c=a+b; //add variable&lt;br /&gt;
System.out.print(&quot;The total of two variable =&quot;);&lt;br /&gt;
System.out.print(c);&amp;nbsp;&amp;nbsp; //Display variable&lt;br /&gt;
}}&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://basicsjavaprogramming.blogspot.com/feeds/290418054916916848/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://basicsjavaprogramming.blogspot.com/2011/06/how-to-declare-variable-in-simple-java.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1892419234778073957/posts/default/290418054916916848'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1892419234778073957/posts/default/290418054916916848'/><link rel='alternate' type='text/html' href='http://basicsjavaprogramming.blogspot.com/2011/06/how-to-declare-variable-in-simple-java.html' title='How to Declare &amp;initialize the variable in simple java programm'/><author><name>ahsan</name><uri>http://www.blogger.com/profile/07285068415581581173</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1892419234778073957.post-6408286103304398889</id><published>2011-06-11T10:22:00.000-07:00</published><updated>2011-06-11T10:22:27.890-07:00</updated><title type='text'>How to show  multi statement in single line</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;class a&lt;br /&gt;
{&lt;br /&gt;
public static void main(String arg[])&lt;br /&gt;
{&lt;br /&gt;
System.out.println(&quot;\t Name : Sulman\n\t\tProgram: BSIT\n\t\t\tsemester: II&quot;);&lt;br /&gt;
/* \t for tab space or \n is use for new line*/&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
}&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://basicsjavaprogramming.blogspot.com/feeds/6408286103304398889/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://basicsjavaprogramming.blogspot.com/2011/06/how-to-show-multi-statement-in-single.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1892419234778073957/posts/default/6408286103304398889'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1892419234778073957/posts/default/6408286103304398889'/><link rel='alternate' type='text/html' href='http://basicsjavaprogramming.blogspot.com/2011/06/how-to-show-multi-statement-in-single.html' title='How to show  multi statement in single line'/><author><name>ahsan</name><uri>http://www.blogger.com/profile/07285068415581581173</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1892419234778073957.post-1202976507009204955</id><published>2011-06-11T02:42:00.000-07:00</published><updated>2011-06-11T02:42:44.900-07:00</updated><title type='text'>How to show an output in a simple  java  program</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;class mn   &lt;br /&gt;
/* mn is  class name, its up to you what like to be call it*/   &lt;br /&gt;
{&lt;br /&gt;
public static void main (String arg[])&lt;br /&gt;
{&lt;br /&gt;
&lt;br /&gt;
System.out.println(&quot;***********&quot;);&lt;br /&gt;
&lt;br /&gt;
System.out.println(&quot;* Name : Ahsan *&quot;);&lt;br /&gt;
&lt;br /&gt;
System.out.println(&quot;* Program : BSIT*&quot;);&lt;br /&gt;
&lt;br /&gt;
System.out.println(&quot;* Semester : III *&quot;);&lt;br /&gt;
&lt;br /&gt;
System.out.println(&quot;***********&quot;);&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
}&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://basicsjavaprogramming.blogspot.com/feeds/1202976507009204955/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://basicsjavaprogramming.blogspot.com/2011/06/how-to-show-output-in-simple-java.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1892419234778073957/posts/default/1202976507009204955'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1892419234778073957/posts/default/1202976507009204955'/><link rel='alternate' type='text/html' href='http://basicsjavaprogramming.blogspot.com/2011/06/how-to-show-output-in-simple-java.html' title='How to show an output in a simple  java  program'/><author><name>ahsan</name><uri>http://www.blogger.com/profile/07285068415581581173</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1892419234778073957.post-2508821487487279202</id><published>2011-06-10T13:33:00.000-07:00</published><updated>2011-06-10T13:33:16.704-07:00</updated><title type='text'>Java Syntax</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;class name &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //you want to save program must match with class name&lt;br /&gt;
{&lt;br /&gt;
public static void main (String arg[])&lt;br /&gt;
{&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
}}&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://basicsjavaprogramming.blogspot.com/feeds/2508821487487279202/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://basicsjavaprogramming.blogspot.com/2011/06/java-syntax.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1892419234778073957/posts/default/2508821487487279202'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1892419234778073957/posts/default/2508821487487279202'/><link rel='alternate' type='text/html' href='http://basicsjavaprogramming.blogspot.com/2011/06/java-syntax.html' title='Java Syntax'/><author><name>ahsan</name><uri>http://www.blogger.com/profile/07285068415581581173</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>