Using batch files ::
Batch files are used to make things less boring and bit faster.
It works on the principle of using the cmd for various tasks.
cmd uses the folder as directories.
To begin with
Batch files work with Windows only.There are scripts that work like batch files
on Linux but they known as bash.
What it does ::
It creates a custom user set on-click application.
The application can do the autonomous task like creating a folder, opening list of folders
A application to create folder/s and opening them
1)create a text file with .bat extension.
2)on creating it there would be a icon on the subsequent screen where the .bat file
3)right click on the icon and select the edit mode.
4)enter the following command in the file.
@echo off <—starts the cmd and executes the command
md folder1 <—creates a folder named "folder1"
start folder1 md foldername as required.
Batch files are great tools to work around as they have many advance features, along with creating and starting a folder.
The commands that are used are highly sensitive if used carelessly it might create unwanted results.
Android apps or sdk comes in with a database built right into it, known commonly as sqlite.Being most widely used database for a wide range of mobile devices, its quite a task when it comes to integrating it correctly to the app.
With the apps built up for testing its quite a pinch, when one has to know weather the given data has been updated into the database.
The method for checking or updating the sqlite database from command prompt can be done with few guided steps as mentioned below.
Checking the working of database in the eclipse environment.
1)go in the ddms mode from the main menu bar.
2)from the left hand side select the required package
3)go to file explorer from the subtitle bar ::adjacent to ddms mode in the same line .
4)select data folder then sub folder named data.
5)seect the package from the subsequent layout.
To check through command shell and do the required editing
1)cd and reach to sdk source.
2)cd and reach to sdk
3) cd and reach to platform-tools.
4)enter command ::adb shell (press enter)
5)enter command ::cd data (press enter)
6)enter command ::cd data (press enter) *2nd time
7)enter command :: ls
lists the required package.
8)enter command ::cd and <required package>.
9)enter command :: ls
10)enter command ::cd databases
11)enter command :: ls
12)enter command ::sqlite3
to exit from sqlite shell :: .exit
As the name goes it quite obvious that, Packages are collection of set or collection of something that are of same type. They are invoked in the first line of code.
There are basically two types of packages.
Type 1: Built in type or system defined.
Type 2: User defined or customized version.
What can be done with packages in JAVA.
1.It can be used to categorize and maintain the classes that are used frequently.
2.It helps in providing ACCESS protection and removes NAMING collision.
HOW TO USE packages:
Packages can be considered as a per-structured frame layout which contains many classes that a user can invoke by calling in the initial lines of the code.There is basically two ways in which a package can be imported.
1.By using –import java.util.Arrays; – this line imports the necessary settings needed for creating arrays, while this line of code imports ONLY the settings that are required to build array.
2.By using — import java.util.*; — imports the complete package.
The optimized way of using packages are by importing only the the required class i.e., by using the 1st method, as it makes the program lightweight and fast.