Categories
Java

Importance syntax rules when working with JAVA

Lets learn some of the basic and critical rules that we should know as JAVA developers. Being aware of a single shortcoming within yourself is far more useful than being aware of a thousand in someone else. 1. Name of Class should start with uppercase letter.Example:- MyFirstClass rather than myfirstclass2.Methods and variables of class should start […]

Categories
Java

How to create executable JAR for TestNG class using intellij and gradle?

Problem:- How to create a executable JAR for testng class using intellij + gradle.Tool stack :– Intellij (IDE) + Gradle (Build tool) + TestNg (Testing framework) Share more learn more  Fb, G+,Twitter  GITHUB for complete code Step1:– Create a basic java class to display “HelloBuild!”, execution using TestNG. public class TestBuild { @Test public void test() { […]

Categories
Java

How to fix Java language level error in Intellij?

Error:- java: strings in switch are not supported in -source 1.5  (use -source 7 or higher to enable strings in switch) Solution:-Why this error, as we are trying to access feature of java(in our case switch statements) using java 1.5 which is actually supported in higher version of java (7 in our case).IDE used is Intellij.Step1:-File > […]

Categories
Java

Basics of HashTable in Java

We started with Array’s in Java and moved to ArrayList, today we would be focusing on Hash Table’s in Java. Further we would be comparing Hast Table with Hash Map. HashTable for happy living  What is a Hash Table? A Hashtable (is a data structure) is similar to ArrayList but here we don’t directly use […]

Categories
Java

ArrayList in Java with Examples

We are already aware that in Java, array size are of fixed-size. Meaning that we have to assign a size to an array, which we cannot increase or decrease.Therefore to change the size, we have to make a new array and copy the data that we want – which is inefficient and a painful technique.To […]

Categories
Automation Java

How to Select random value from a DropDownList using Selenium or UFT

Requirement:- We need to select random value from a given dropdownlist, to test the functionality how our AUT would behave under varying selection of options. DropDownlist + HTML code Approach:- 1.We would take the count of existing options in the weblist/dropdownlist . 2.Take a random value between 0(starting index of the dropdownlist, we can avoid […]

Categories
Java

Array in Java

What is an Array?An array is storehouse or we can say collection of similar type of data type.It is a data structure where we store similar elements. We can store only fixed set of elements in a java array(solution is ArrayList in Java) unlike vbscript where we can have dynamic arrays using Redim keyword.“Stop being […]

Categories
Java

Exploring Data Type & Variables in Java

Java is a strongly typed programming language unlike Vbscript,Perl.In novice terms it means that all the variables in the Java programming language ought to have a particular data type.Example we cannot use a variable say “xyz” in the code before declaring this like:- String xyz;What is a Variable?Variable is the name given to the reserved […]

Categories
Java

Key Components of JAVA

JDK, JRE and JVM are core concepts of Java programming language. As a novice in this language we should try to comprehend these concepts to visualize how it works logically.For more updates do follow us on Facebook,Twitter or Google+ Java Development Kit (JDK) consists of tools needed to create the Java programs,like Java libraries, Java […]

Categories
Java

Introduction to JAVA

Have faith, love and courage to learn and share with others.That is what we at uftHelp believe in.We are starting this series of tutorials with focus on JAVA programming language.Do follow us on Fb,G+,Twitter for more updates. History:-It kick-started in 1991, when a group of Sun Microsystem engineers team (called as Green Team, led by James Gosling) put up their efforts […]