Solved

Array of different primitives ??

Posted on 2003-11-08
15
406 Views
Last Modified: 2010-03-31
I have a JDBCWrapper class which has a executeStoredProc(String procName,Object[] arguments) method.
When i need to call a stored procedure...i call this method and pass all my arguments as an Object array. Ex. If i need to call a Stored Proc that adds two integer numbers (AddNum) , i would do the following.

executeStoredProc(AddNum,new Object[]{new Integer(5),new Integer(10)}).

The method would prepare the required callable statment with the required number of '?' and depending on the Object[] element types would do a setInt or setString,setFloat etc etc.

Now my problem is that somestimes i have 20 arguments , so i am creating 20 objects (and creating new instance is always expensive).

Is there any other way i could pass my arguments as an array and find out their type inside the method. I regularly use String,int,float.
Basically can we store primitives,String objects in the same Array kind of implementation ? Please suggest
0
Comment
Question by:rahulkothari
  • 6
  • 2
  • 2
  • +2
15 Comments
 
LVL 86

Accepted Solution

by:
CEHJ earned 64 total points
ID: 9707320
>>Is there any other way i could pass my arguments as an array

No, AFAIK. Creating 20 Objects is not *too* expensive - if you think that's expensive there'd be things inside the standard library classes (especially Swing) that'd make your hair stand on end ;-)
0
 
LVL 15

Expert Comment

by:JakobA
ID: 9707348
Nope. you must eiter wrap your primitives in objects, or else make  3 to the 20'eth different versions of your executeStoredProc method.

a fairly easy intermediate soulution would be to make a wrapThisPrimitive method that returned the parameter value in an object, you would only need one for each of int, String and float.
and then 20 different executeStoredProc methods with from 1 to 20 object parameters.

eg: your example call would become:  executeStoredProc( AddNum, wrap(5), wrap(10) )

There would be absolutely no runtime speed improvement though. rather the reverse.

regards JakobA
0
 
LVL 1

Assisted Solution

by:BuddhaBuddy
BuddhaBuddy earned 62 total points
ID: 9719244
That last was a good start, but doesn't take it far enough.

Create an extension of ArrayList that has a wrap() method receiving each type of primative you need.

import java.util.ArrayList;

public class WrapList extends ArrayList
{
    public WrapList wrap(int val) {add(new Integer(val)); return this;}
    public WrapList wrap(float val) {add(new Float(val)); return this;}
    public WrapList wrap(double val) {add(new Double(val)); return this;}
    /* ... */
    public WrapList wrap(Object val) {add(val); return this;}
}

This class is very simple to use, similar to how StringBuffer is commonly used.

    executeStoredProc(AddNum, new WrapList().wrap(10).wrap(1.4).wrap("Testing"));

With this class, all you need to do is accept a Collection in your method and iterate over it's values.

public void executeStoredProc(AddNum addNum, Collection params)
{
    // Get your statement from your query object
    CallableStatement stmt = getStatement(addNum);
    Object param;
    int count = 0;
    for(Iterator iter = params.iterator(); iter.hasNext();)
    {
        param = iter.next();
        if(param instanceof Integer)
            stmt.setInt(++count, ((Integer)param).intValue());
        else if(param instanceof Float)
            stmt.setFloat(++count, ((Float)param).floatValue());
        else ....
    }
    // Execute the statement and get the results
}
0
 
LVL 1

Expert Comment

by:BuddhaBuddy
ID: 9719250
I also wanted to add that if you are doing DB queries, the overhead for creating 20 objects is the least of your performance problems, especially if it is a remote database. In a user-driven application, it is completely ignorable. The objects will be created by the time the user has removed their finger from the mouse button.
0
 
LVL 9

Expert Comment

by:doronb
ID: 9727782
I have exactly such a primitive wrapper, what it does better is to re-use elements so that there isn't too much memory wasted and it is also optimized to handle primitive nulls as wll.  If you wish to see the code tell me since its quite long :)
0
 

Author Comment

by:rahulkothari
ID: 9960978
doronb....let me see the code
0
Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 9

Assisted Solution

by:doronb
doronb earned 62 total points
ID: 9962226
package <whatever-you-want>;

import java.lang.reflect.*;
import java.text.*;
import java.util.*;

class Argument {
      protected Object array;

      protected Argument(Class objClass) {
            // Create an array object containing one element of the class specified..
            array = Array.newInstance(objClass, 1);
      }

      protected void verifyClass(Class objClass) {
            // Create an array object only if the class type is mismatched or we have no element at all..
            if ((array == null) || (!objClass.equals(Array.get(array, 0).getClass()))) {
                  array = Array.newInstance(objClass, 1);
            }
      }

      protected Object getData(boolean nullAsClass) {
            // Get the object stored..
            Object result = Array.get(array, 0);
            // If this argument isn't supposed to contain a NULL, return the result..
            if (!nullAsClass && (result instanceof Class)) {
                  result = null;
            }
            return result;
      }
}

public class Arguments extends Vector {
      protected boolean nullAsClass;
      protected boolean methodError;
      protected boolean showExceptions;
      protected SimpleDateFormat sdfTranslator;

      protected final static String[][] booleanStrings = new String[][] {
            new String[] {"true", "false"},
            new String[] {"yes", "no"},
            new String[] {"1", "0"}
      };

      public Arguments() {
            super();
            // General initialization..
            nullAsClass = false;
            displayExceptions();
            forceEmpty();
            setDateFormat("dd/MM/yyyy HH:mm:ss");
      }

      public Arguments(Object collectee) {
            this();
            // Collect through Reflection all the fields an object has..
            collectData(collectee);
      }

      public void setDateFormat(String dateFormat) {
            // Change the date format..
            sdfTranslator = new SimpleDateFormat(dateFormat);
      }

      public void displayExceptions() {
            showExceptions = true;
      }

      public void hideExceptions() {
            showExceptions = false;
      }

      public void forceEmpty() {
            methodError = false;
            removeAllElements();
            trimToSize();
      }

      public void collectData(Object dataObj) {
            Object data = null;
            Class c = dataObj.getClass();
            Field[] fList = c.getDeclaredFields();
            boolean af = false;
            try {
                  for (int i = 0; i < fList.length; i++) {
                        Field f = fList[i];
                        af = f.isAccessible();
                        if (!af) {
                              f.setAccessible(true);
                        }
                        data = f.get(dataObj);
                        if (!af) {
                              f.setAccessible(false);
                        }
                        if (data != null) {
                              addElement(data);
                        } else {
                              addNull(f.getType());
                        }
                  }
            } catch (Exception ex) {
                  forceEmpty();
                  ex.printStackTrace();
            }
      }

      public Class[] getArgumentsTypes() {
            Class[] result = null;
            if (!isEmpty()) {
                  result = new Class[size()];
                  int count = 0;
                  Class classType = null;
                  Enumeration enum = elements();
                  Object obj = null;
                  Argument arg = null;
                  while (enum.hasMoreElements()) {
                        obj = enum.nextElement();
                        try {
                              classType = obj.getClass();
                              if (obj instanceof Argument) {
                                    arg = (Argument)obj;
                                    obj = arg.array;
                                    if (arg.getData(nullAsClass) == null) {
                                          classType = (Class)Array.get(obj, 0);
                                    } else {
                                          classType = obj.getClass().getComponentType();
                                    }
                              }
                        } catch (Exception ex) {
                        }
                        result[count++] = classType;
                        classType = null;
                  }
            }
            return result;
      }

      public Object[] getArguments() {
            Object[] result = null;
            if (!isEmpty()) {
                  result = new Object[size()];
                  int count = 0;
                  Object classData = null;
                  Enumeration enum = elements();
                  Object obj = null;
                  while (enum.hasMoreElements()) {
                        obj = enum.nextElement();
                        try {
                              classData = unWrapObject(obj);
                        } catch (Exception ex) {
                        }
                        result[count++] = classData;
                        classData = null;
                  }
            }
            return result;
      }

      public long[] getLongArray() {
            long[] result = new long[size()];
            try {
                  int i = 0;
                  Enumeration eId = elements();
                  Object xObj = null;
                  while (eId.hasMoreElements()) {
                        xObj = unWrapObject(eId.nextElement());
                        if (xObj instanceof Number) {
                              result[i++] = ((Number)xObj).longValue();
                        } else if (xObj instanceof String) {
                              result[i++] = Long.parseLong((String)xObj);
                        }
                  }
            } catch (Exception ex) {
                  result = null;
            }
            return result;
      }

      public Object getInstance(String objClassName) {
            Exception ex = null;
            Object result = null;
            Object[] args = null;
            Class[] argTypes = null;
            try {
                  args = getArguments();
                  argTypes = getArgumentsTypes();
                  Class objClass = Class.forName(objClassName);
                  Constructor con = objClass.getDeclaredConstructor(argTypes);
                  boolean ia = con.isAccessible();
                  if (!ia) {
                        con.setAccessible(true);
                  }
                  result = con.newInstance(args);
                  con.setAccessible(ia);
            } catch (Exception ex0) {
                  ex = ex0;
                  methodError = true;
                  if (showExceptions) {
                        ex.printStackTrace();
                  }
            } finally {
                  if (ex != null) {
                        // Report failure..
                        methodError = true;
                        String pType = null;
                        System.err.println("Constructor not found for class [" + objClassName + "] {");
                        System.err.print("\t" + GenUtils.shortClassName(objClassName) + " (");
                        for (int i = 0; i < argTypes.length; i++) {
                              pType = argTypes[i].getName();
                              pType = pType.substring(pType.lastIndexOf(".") + 1);
                              System.err.print(pType + " " + "p" + i);
                              if (i < argTypes.length - 1) {
                                    System.err.print(", ");
                              }
                        }
                        System.err.println(");\r\n}");
                        if (showExceptions) {
                              ex.printStackTrace();
                        }
                  }
                  return result;
            }
      }

      public Method getMethod(Object obj, String methodName) {
            return getMethod(obj.getClass(), methodName);
      }

      public Method getMethod(Class objClass, String methodName) {
            Exception ex = null;
            Method result = null;
            Class[] argTypes = null;
            try {
                  argTypes = getArgumentsTypes();
                  // Get the method directly declared by the instance's class..
                  result = objClass.getDeclaredMethod(methodName, argTypes);
            } catch (NoSuchMethodException nmsex) {
                  try {
                        // Get the method inherited by the instance's class from its parents..
                        result = objClass.getMethod(methodName, argTypes);
                  } catch (NoSuchMethodException nmsex0) {
                        ex = nmsex0;
                  } catch (Exception ex0) {
                        ex = ex0;
                  }
            } catch (Exception ex1) {
                  ex = ex1;
            } finally {
                  if (ex != null) {
                        // Report failure..
                        methodError = true;
                        String pType = null;
                        System.err.println("Method not found for class [" + objClass.getName() + "] {");
                        System.err.print("\t" + methodName + "(");
                        if (argTypes != null) {
                              for (int i = 0; i < argTypes.length; i++) {
                                    pType = argTypes[i].getName();
                                    pType = pType.substring(pType.lastIndexOf(".") + 1);
                                    System.err.print(pType + " " + "p" + i);
                                    if (i < argTypes.length - 1) {
                                          System.err.print(", ");
                                    }
                              }
                        }
                        System.err.println(");\r\n}");
                        if (showExceptions) {
                              ex.printStackTrace();
                        }
                  }
                  return result;
            }
      }

      public Object runMethod(Object obj, String methodName) {
            return runMethod(obj, getMethod(obj, methodName));
      }

      public boolean hadMethodError() {
            return methodError;
      }

      public Object runMethod(Object obj, Method method) {
            Object result = null;
            try {
                  Class[] mTypes = method.getParameterTypes();
                  Class[] aTypes = getArgumentsTypes();
                  if (aTypes == null) {
                        aTypes = new Class[0];
                  }
                  if (mTypes.length == aTypes.length) {
                        for (int i = 0; i < aTypes.length; i++) {
                              if (!mTypes[i].equals(aTypes[i])) {
                                    methodError = true;
                                    return null;
                              }
                        }
                        Object[] args = getArguments();
                        boolean ia = method.isAccessible();
                        if (!ia) {
                              method.setAccessible(true);
                        }
                        result = method.invoke(obj, args);
                        method.setAccessible(ia);
                  } else {
                        methodError = true;
                  }
            } catch (NullPointerException npe) {
                  methodError = true;
            } catch (Exception ex) {
                  ex.printStackTrace();
            } finally {
                  return result;
            }
      }

      private boolean translateBoolean(String value) {
            for (int i = 0; i < booleanStrings.length; i++) {
                  if (booleanStrings[i][0].equalsIgnoreCase(value)) {
                        return true;
                  } else if (booleanStrings[i][1].equalsIgnoreCase(value)) {
                        return false;
                  }
            }
            return false;
      }

      public void addElement(Object value, Class caster) {
            if (caster == Date.class) {
                  try {
                        super.addElement(sdfTranslator.parse(value.toString()));
                  } catch (ParseException ex) {
                  }
            } else if ((caster == boolean.class) || (caster == Boolean.class)) {
                  addElement(translateBoolean(value.toString()));
            } else if ((caster == byte.class) || (caster == Byte.class)) {
                  addElement(Byte.parseByte(value.toString()));
            } else if ((caster == double.class) || (caster == Double.class)) {
                  addElement(Double.parseDouble(value.toString()));
            } else if ((caster == float.class) || (caster == Float.class)) {
                  addElement(Float.parseFloat(value.toString()));
            } else if ((caster == int.class) || (caster == Integer.class)) {
                  addElement(Integer.parseInt(value.toString()));
            } else if ((caster == long.class) || (caster == Long.class)) {
                  addElement(Long.parseLong(value.toString()));
            } else if ((caster == short.class) || (caster == Short.class)) {
                  addElement(Short.parseShort(value.toString()));
            } else {
                  addElement(value);
            }
      }

      public void addElement(Object data) {
            Class caster = data.getClass();
            String value = String.valueOf(data);
            if ((caster == boolean.class) || (caster == Boolean.class)) {
                  addElement(translateBoolean(value));
            } else if ((caster == byte.class) || (caster == Byte.class)) {
                  addElement(Byte.parseByte(value));
            } else if ((caster == double.class) || (caster == Double.class)) {
                  addElement(Double.parseDouble(value));
            } else if ((caster == float.class) || (caster == Float.class)) {
                  addElement(Float.parseFloat(value));
            } else if ((caster == int.class) || (caster == Integer.class)) {
                  addElement(Integer.parseInt(value));
            } else if ((caster == long.class) || (caster == Long.class)) {
                  addElement(Long.parseLong(value));
            } else if ((caster == short.class) || (caster == Short.class)) {
                  addElement(Short.parseShort(value));
            } else {
                  super.addElement(data);
            }
      }

      public static char unWrapChar(Object obj) {
            return ((Character)unWrap(obj)).charValue();
      }

      public static boolean unWrapBoolean(Object obj) {
            return ((Boolean)unWrap(obj)).booleanValue();
      }

      public static byte unWrapByte(Object obj) {
            return ((Byte)unWrap(obj)).byteValue();
      }

      public static double unWrapDouble(Object obj) {
            return ((Double)unWrap(obj)).doubleValue();
      }

      public static float unWrapFloat(Object obj) {
            return ((Float)unWrap(obj)).floatValue();
      }

      public static int unWrapInteger(Object obj) {
            return ((Integer)unWrap(obj)).intValue();
      }

      public static long unWrapLong(Object obj) {
            return ((Long)unWrap(obj)).longValue();
      }

      public static short unWrapShort(Object obj) {
            return ((Short)unWrap(obj)).shortValue();
      }

      public static Object unWrap(Object obj) {
            return (obj instanceof Argument) ? ((Argument)obj).getData(false) : obj;
      }

      private Object unWrapObject(Object obj) {
            return (obj instanceof Argument) ? ((Argument)obj).getData(nullAsClass) : obj;
      }

      public void addElement(boolean value) {
            Argument o = createArrayObject(boolean.class);
            Array.setBoolean(o.array, 0, value);
            addElement(o);
      }

      public void addElement(byte value) {
            Argument o = createArrayObject(byte.class);
            Array.setByte(o.array, 0, value);
            addElement(o);
      }

      public void addElement(char value) {
            Argument o = createArrayObject(char.class);
            Array.setChar(o.array, 0, value);
            addElement(o);
      }

      public void addElement(double value) {
            Argument o = createArrayObject(double.class);
            Array.setDouble(o.array, 0, value);
            addElement(o);
      }

      public void addElement(float value) {
            Argument o = createArrayObject(float.class);
            Array.setFloat(o.array, 0, value);
            addElement(o);
      }

      public void addElement(int value) {
            Argument o = createArrayObject(int.class);
            Array.setInt(o.array, 0, value);
            addElement(o);
      }

      public void addElement(long value) {
            Argument o = createArrayObject(long.class);
            Array.setLong(o.array, 0, value);
            addElement(o);
      }

      public void addElement(short value) {
            Argument o = createArrayObject(short.class);
            Array.setShort(o.array, 0, value);
            addElement(o);
      }

      public void setElementAt(boolean value, int index) {
            Argument o = createArrayObject(boolean.class, this, index);
            Array.setBoolean(o.array, 0, value);
      }

      public void setElementAt(byte value, int index) {
            Argument o = createArrayObject(byte.class, this, index);
            Array.setByte(o.array, 0, value);
      }

      public void setElementAt(char value, int index) {
            Argument o = createArrayObject(char.class, this, index);
            Array.setChar(o.array, 0, value);
      }

      public void setElementAt(double value, int index) {
            Argument o = createArrayObject(double.class, this, index);
            Array.setDouble(o.array, 0, value);
      }

      public void setElementAt(float value, int index) {
            Argument o = createArrayObject(float.class, this, index);
            Array.setFloat(o.array, 0, value);
      }

      public void setElementAt(int value, int index) {
            Argument o = createArrayObject(int.class, this, index);
            Array.setInt(o.array, 0, value);
      }

      public void setElementAt(long value, int index) {
            Argument o = createArrayObject(long.class, this, index);
            Array.setLong(o.array, 0, value);
      }

      public void setElementAt(short value, int index) {
            Argument o = createArrayObject(short.class, this, index);
            Array.setShort(o.array, 0, value);
      }

      public void insertElementAt(boolean value, int index) {
            Argument o = createArrayObject(boolean.class);
            Array.setBoolean(o.array, 0, value);
            insertElementAt(o, index);
      }

      public void insertElementAt(byte value, int index) {
            Argument o = createArrayObject(byte.class);
            Array.setByte(o.array, 0, value);
            insertElementAt(o, index);
      }

      public void insertElementAt(char value, int index) {
            Argument o = createArrayObject(char.class);
            Array.setChar(o.array, 0, value);
            insertElementAt(o, index);
      }

      public void insertElementAt(double value, int index) {
            Argument o = createArrayObject(double.class);
            Array.setDouble(o.array, 0, value);
            insertElementAt(o, index);
      }

      public void insertElementAt(float value, int index) {
            Argument o = createArrayObject(float.class);
            Array.setFloat(o.array, 0, value);
            insertElementAt(o, index);
      }

      public void insertElementAt(int value, int index) {
            Argument o = createArrayObject(int.class);
            Array.setInt(o.array, 0, value);
            insertElementAt(o, index);
      }

      public void insertElementAt(long value, int index) {
            Argument o = createArrayObject(long.class);
            Array.setLong(o.array, 0, value);
            insertElementAt(o, index);
      }

      public void insertElementAt(short value, int index) {
            Argument o = createArrayObject(short.class);
            Array.setShort(o.array, 0, value);
            insertElementAt(o, index);
      }

      public void addNull(Class classType) {
            Argument o = createArrayObject(Class.class);
            Array.set(o.array, 0, classType);
            addElement(o);
      }

      public void setNullAt(Class classType, int index) {
            Argument o = createArrayObject(Class.class);
            Array.set(o.array, 0, classType);
            setElementAt(o, index);
      }

      public void insertNullAt(Class classType, int index) {
            Argument o = createArrayObject(Class.class);
            Array.set(o.array, 0, classType);
            insertElementAt(o, index);
      }

      private static Argument createArrayObject(Class objClass, Arguments args, int index) {
            Argument arg = (Argument)args.elementAt(index);
            arg.verifyClass(objClass);
            return arg;
      }

      private static Argument createArrayObject(Class objClass) {
            return new Argument(objClass);
      }
}
0
 
LVL 9

Expert Comment

by:doronb
ID: 9962290
Sorry.. a little change was in order... (old classes)

New constructor of Argument:

      protected Argument(Class objClass) {
            verifyClass(objClass);
      }

New createArrayObject(...) method for the Arguments class:

      private static Argument createArrayObject(Class objClass, Arguments args, int index) {
            Argument result = null;
            Object x = args.elementAt(index);
            if (x instanceof Argument) {
                  result = (Argument)x;
                  result.verifyClass(objClass);
            } else {
                  result = createArrayObject(objClass);
            }
            return result;
      }

Now, you can write a program like this:

      public static void main(String[] args) {
            // Create a new Arguments object..
            Arguments xArgs = new Arguments();
            // Add a boolean value..
            xArgs.addElement(true);
            // Add a String..
            xArgs.addElement("Hello");
            // Add an int..
            xArgs.addElement(1);
            // Get the objects out of the Arguments as an array of objects..
            Object[] o = xArgs.getArguments();
            // Go through all objects..
            for (int i = 0; i < o.length; i++) {
                  // and print each object..
                  System.out.println(o[i]);
            }
            // Replace the 'true' with 'false', you will notice, no new objects were created now!
            xArgs.setElementAt(false, 0);
            // Replace the String "Hello" with the int 2, we will create an array object to hold the new int value now..
            xArgs.setElementAt(2, 1);
            // Replace the int 1, with the String "GoodByte", we will discard the old array object in place of the new String..
            xArgs.setElementAt("GoodBye", 2);
            // Get the objects out of the Arguments as an array of objects..
            o = xArgs.getArguments();
            // Go through all objects..
            for (int i = 0; i < o.length; i++) {
                  // and print each object..
                  System.out.println(o[i]);
            }
      }

This little method produces the following output:

true
Hello
1
false
Hello
GoodBye
0
 
LVL 15

Assisted Solution

by:JakobA
JakobA earned 62 total points
ID: 9962321
A pretty good rule in programming, and especially in learning to program, is:

        "Do not make things complicated until you know how to make them simple."


public Object wrap( boolean boo ) {
      return (Object) new Boolean( boo );
} //endmethod wrap

public Object wrap( String str ) {
      return (Object) str;            // string merely need casting
} //endmethod wrap

public Object wrap( int nr ) {
      return (Object) new Integer( nr );
} //endmethod wrap

public Object wrap( float flo ) {
      return (Object) new Float( flo );
} //endmethod wrap

public Object wrap( double dou ) {
      return (Object) new Double( dou );
} //endmethod wrap

... one for each simple datatype you need to wrap.
0
 
LVL 9

Expert Comment

by:doronb
ID: 9962363
And in my database applications, I have code like this one:

  public boolean insertCell(String cellName, String sgsnName, String routingArea, String caDomain, String state) {
    boolean result = false;
    String query = "InsertCell";
    SQLArguments sqlArgs = fetchSqlArguments(query);
    sqlArgs.putElement(cellName);
    sqlArgs.putElement(sgsnName);
    sqlArgs.putElement(routingArea);
    sqlArgs.putElement(caDomain);
    sqlArgs.putElement(state);
    result = executeUpdate(query, sqlArgs) > 0;
    databaseChanged(result, true);
    return result;
  }

  public boolean deleteCell(String cellName) {
    boolean result = false;
    String query = "DeleteCell";
    SQLArguments sqlArgs = fetchSqlArguments(query);
    sqlArgs.putElement(cellName);
    result = executeUpdate(query, sqlArgs) > 0;
    databaseChanged(result, true);
    return result;
  }

  public boolean updateCell(String cellName, String sgsnName, String caDomain, String state) {
    String query = "UpdateCell";
    SQLArguments sqlArgs = fetchSqlArguments(query);
    sqlArgs.putElement(sgsnName);
    sqlArgs.putElement(caDomain);
    sqlArgs.putElement(state);
    sqlArgs.putElement(cellName);
    boolean result = executeUpdate(query, sqlArgs) > 0;
    databaseChanged(result, true);
    return result;
  }

Please note that the putElement(..) method in SQLArguments knows whether to use addElement(..) or setElementAt(..) :)

Hope this helps,
Doron
0
 
LVL 9

Expert Comment

by:doronb
ID: 11507804
PAQ and Point Split.
0
 
LVL 9

Expert Comment

by:doronb
ID: 11645866
No objections here :)
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed. ------------------------- Start The idea here is to target your cell phones with the correct…
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
Viewers learn about the “while” loop and how to utilize it correctly in Java. Additionally, viewers begin exploring how to include conditional statements within a while loop and avoid an endless loop. Define While Loop: Basic Example: Explanatio…
This video teaches viewers about errors in exception handling.

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now