Monday, July 27, 2020

Basics of Java Programming | Java Basics Learn Easy

Basic java Syntax


About java programs,it is very important to keep in mind the following points.
  • Case Sensitivity: Java is case sensitive, which means identifier Hello and hello would have different meaning in Java.
  • Class Names:For all class names the first letter should be in Upper Case.
  1. if several words are used to form a name of the class,each inner word's first letter should be Upper Case.
  2. Example class MyFirstJavaClass.
  • Method Names: All Method names should start with a Lower Case letter.
  1. If several words are used to form the name of the method,then each inner word's first letter should be in Upper Case.
  2. Example public void myMethodName()
  • Program File Name: Name of the program file should exactly match the class name.
  1. when saving the file,you should save it the class name(Remember Java is case sensitive  and append.'.Java' to the end of the name(if the file name and the class name do not match your program will not complie)
  2. Example:Assume 'MyFirstJavaProgram'is the class name.Then the file should be saved as MyFirstJavaProgram.java  
  • public static void main(Stringargs[]) : Java program processing starts from the main() method which is mandatory part of every Java program.
Hello World Example

class HelloWorld
{
public static void main(String args[])
{
System.out.println("Hello world");
}
}

If all goes well you see the following output.
Hello world

Explanation:
  • All code is contained within a class,in this case HelloWorld.
  • class  keyword is used to declare a class in java.
  • public  keyword is an access modifier which represents visibility,means visible to all.
  • The file name must match the class name and have a .java extension, for example: HelloWorld.java.
  • All executable statements are contained within a method,in this case named main();
  • Use System.out.println() to print text to the terminal.

Sunday, July 26, 2020

Step by Step Procedure to install Java | Installation of Java in Windows |

Installing java?



Various editions of Java:
  • Java SE : stands for Java edition and is normally for developing desktop applications,forms the core.base API.
  • Java EE : stands for java enterprise edition for applications which run on servers,for example websites.
  • Java ME : stands for java micro(mobile)edition for applications which run on resource constrained devices(small scale applications) like Cell phones,for example games.
Every Java edition consists of two elements : JRE and JDK:
  • JRE: Java Runtime Environment. it is basically the java Virtual Machine where your java programs run on.It also includes browser plugins for Applet execution.
  • JDK: it's the full featured software Development kit for Java,including JRE and the compilers and tools (like JavaDoc,and Java Debuger)to create and compile programs.
Usually, when you only care about running Java programs on your browser or computer you will only install JRE. It's all you need. On the other hand, if you are planning to do some Java programming, you will also need JDK.
if you are a beginner ot you simply want to learn Java you can go ahed and download the JDK(Java Development Kit) for the Java SE edition. Simply download and install the exe file by following the instructions.

Setting Path variable

  • The PATH is the system or user variable that your operating system uses to locate needed executable from the command line or Terminal window.
  • the PATH system or user variable can be set using System Utility in control panel on windows, or in your shell's startup file on Linux and Solaris.
In simple words PATH helps the operating System to find where Java is installed.
Note: you need to copy the location of the bin folder of the Java installation directory in the PATH's Value field.
Example for Windows:
\ProgramFiles\Java\Jdk-176\bin;
Windows 8:
  • Drag the mouse pointer to the right bottom corner of the screen.
  • Click on the Search icon and type:Control Panel.
  • Click on->Control Panel ->System->Advanced
  • Click on Environment Variables under User variables, find PATH, and click on it.
  • In the Edit windows,modify PATH by adding the location of the class to the value for PATH.if you do not have the item PATH, you may select to add a new variable and add PATH as the name and the location of the java bin folder as the value.
  • close the window.
  • reopen command prompt window,and run your java code,
Windows 7:

  • Select Computer from the Start menu
  • Choose System Properties from the context menu.
  • Click Advanced System settings > Advance tab.
  • Click on Environment Variables, under User Variables,find PATH , and click on it.
  • In the Edit windows,modify PATH by adding the location of the class to the value for the class to the value for PATH. If you do not have the item PATH,you may select to add a new variable and add PATH as the name and the location of the java bin folder as the value.
  • Re open Command prompt window , and run your java code.
Windows XP:
  • Start-> Control Panel ->System->Advanced
  • Click on Environment Variables,under User Variables,find PATH, and click on it.
  • In the Edit windows,modify OATH by adding the location of the class to the value for the class to the value for PATH.If you do not have the item PATH,you may select to add a new variable and add PATH as the name and the location of the Java bin folder as the value.
  • Re open command prompt window, and run your java code. 
Compiling and Execution:
  • Create a temporary folder C:\mywork. Using Notepad or another text editor, create a small java file HelloWorld.java as shown in the HelloWorld example in the HelloWorld chapter.
  • Save your files as HelloWorld.java in C:\mywork. To make sure your file name is HelloWorld.java(not HelloWorld.java.txt),first choose "Save as File type:| All files, then type in the File Name HelloWorld.java.
  • Run Command Prompt(found under All Programs/Accessories in the Start menu).
Type:
1:C:cd\mywork
This makes C:\mywork the current directory
2: C:\mywork>;dir
This displays the directory contents.You should see HelloWorld.java among the files.
3 C:\mywork>javac HelloWorld.java
This runs java.exe,the compiler.You should see nothing but the next system prompt..
4C:\mywork>;dir : javac has created the HelloWorld.class file.You should see HelloWorld.java and HelloWorld.class among the files.
5: C:\mywork>java HelloWorld
This Runs the java interpreter You should see the program Out put: Hello, world !.

How to Install R Studio and Tomcat in Ubuntu

How to install R Studio in Ubuntu. Intsalling R Studio in Ubuntu we have to  follow the 3 steps for installation those are listed. Laks Tutorial follow the simple and basic steps for installation
Step1:Goto terminal in ubuntu type sudo apt-getupdate press enter
Step 2: sudo apt-getinstall r-base press enter
Step 3:  Now download the  software R-Studio (32-bit) here or 64-bit
sudo dpkg -i <package name>   OR Install this software through Ubuntu Software Center.
Now you have successfully installed



Installation of Tomcat in Ubuntu
Before Tomcat installation in ubuntu first you need to install java
Step 1:
sudo apt-get update
sudo apt-get install openjdk-7-jdk
Download Tomcat package from apache site: 
                                                            
After downloading, extract the file and copy the folder to 'web' folder in 'home' folder (create 'web' folder in 'home' folder).
Step 2:  Now path setup in .bashrc file
$ gedit .bashrc
go to end of the file and type
export CATALINA_HOME=/home/user/web/apache-tomcat-8.0.29
export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-i386
save and exit

Step 3:
Once the path setup complete, now run [start] tomcat service.
Go to the 'bin' folder of the tomcat
(ex.: /home/user/web/apache-tomcat-8.0.29/bin)
bin$ sh startup.sh
To check open browser and open localhost:8080, click on 'Manager App' button.
user error

Step 4:
Setting up user for accessing App
Now open 'tomcat-users.xml' file in 'conf' folder of tomcat folder.
copy below text at <tomcat-users> field.
<role rolename="manager-gui"/>
<user username="admin" password="admin" roles="manager-gui"/>
save and exit

Now restart tomcat service

bin$ sh shutdown.sh
bin$ sh startup.sh

To check open browser and open localhost:8080, click on 'Manager App'
button then type "admin" in User Name and Password fields.

Now you have successfully install and configuring the tomcat in Ubuntu.

How to Calculate Sum in Excel | How to calculate Auto sum in Excel

Different ways to calculate  sum in Excel.In excel if you wants to add or sum of rows or columns excel you can do easily with the help of sum functions and auto sum operation in excel. Read the entire post for learning different ways to calculate the sum in excel workbooks.

How to calculate sum in excel by Using AutoSum

First and most shortest way to calculate the sum in excel is by using the AutoSum function in excel.In excel AutoSum function directly available in Home tab in that editing there you can find AutoSum button.
Autosum


Auto Sum button availbe in one more location that is in Formulas tab in that Autosum Button is there
Autosum-excel

Example

Calculating the Sum by using Autosum function in Coulmns
Step 1: Enter Any numbers for addition in one column.
Step 2: Select the Blank Cell after the numbers 
Step 3: Click the Auto sum Button on the Home Ribbon.
 Alt+= is the short cut for the sum of the cells.
Sum-excel
The Sum formula will appear in the cell. Which means that it will calculate the some from the particular cells only. In the Image it will add the F6 to F11 only.
TIPS: Once You enter the formula you can copy and paste calculating the some from other cells or other sheets also.

Typing Formula in the Cells 

Just type the Formula in the Blank cell shown above. Formula is =Sum(Your First Cell : and Last Cell)

Friday, March 02, 2018

How to uninstall Chrome permanently in windows

Chrome is the best browser for your windows pc. In some cases unexpectedly your chrome was crashed. If you wants to delete your chrome browser from control panel  chrome browser was uninstalled but when you install chrome again on your computer it will not install 

Friday, February 16, 2018

How to create a Bootable USB for windows vista

Installing  windows 7 or vista by USB . Easy way to create a your USB  to bootable USB devices.
Before creating bootable devices you must and should have the ISO file or you can download from the related operating system websites.
STEP 1: For creating bootable USB we just installing POWER ISO  software for free. Just download the software from the POWERISO website and install the software on your PC.
STEP 2: After installing the poweriso software open it run as administrator
STEP 3: The it will open the POWERISO application. from that go to Tools in that select  create bootable USB drive
bootable-usb

STEP 4: It will Opens the new window create bootable USB
bootable-iso-usb

STEP 5: Select source file or image disc means select your Opeating Systems ISO file .
STEP 6: In Destination USB drive select your USB device and select start.
bootable-usb

STEP 7: It will Convert your USB device to Bootable USB device.
bootable-usb-windows

Successfully You Converted your USB device to bootable USB Device
USB-bootable

After Successful completion now you can install windows operating system through USB

Conclusion: I hope you people got the information how to convert the Your USB to Bootable USB. If there is any doubts please write comments.


Saturday, February 10, 2018

How to Activate whatsApp payment | How to create WhatsApp UPI payment

WhatsApp you people well known the word. I think you people are familiar to work with whats up. Now whatsApp launched the payment system in their latest update version. WhatsApp payment feature is mainly based on Unified payment Interface(UPI).Presently WhatsApp payment system is under beta version .Shall we start how to create the WhatsApp UPI payment system in your whatsApp.
whats up UPI payment activation on Your Number

Open your whatsApp
 Goto chat list and select any one of the your liked contact chat.
 In that go to attachment symbol from the list you select payment option.
whatsapp-payment

 Go to your settings from their also you can select payments option.
whatsapp-payment

Click on Payment It will Verify your phone number via sms. After verifying sms it will show the list of bank account.

whatsapp-addbank

From the list of bank names you select which bank account your having click on that.
Note:Your whatsApp number is the same on listed on your bank account. 
Select Your bank account  from the list it. verify your number on the bank account.
whatsapp-bank

Successfully you added Your whatsApp number to whatsApp payment system.
You send or receive money through who are registered whatsapp payment service on their mobile number
Start sending or receiving money through your whatsApp.
whatsapp
How to activate whatsapp Payment service in your whats App number You can watch the video for step by step procedure.
Conclusion: I Hope you people got the information How to create a WhatsApp Payment service through your whatsApp number.